Frequently Asked Questions

 

   

Quick Navigation - Main Index

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

Writing Better and Faster Scripts

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

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

For Loop Collect Vs For Loop Do Performance

Optimizing Particle Flow Script Operator For Loops For Speed

Using Bsearch For Fast Table Lookup

How To Make It Better?

See Also