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.
Scripted Functions
- ApplyPlanarMap
-
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 in an Editable Mesh.
- 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 sub-directories.
- TimeFromSolarTime
-
Returns the time value stored in a Daylight_Slave_Controller
- getFaceSmoothGroupB
-
Gets the Editable Mesh Smoothing Groups
- setFaceSmoothGroupB
-
Sets the Editable Mesh 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
-
Converts a mixed case string to upper case to demonstrate the use of various string
value related methods.
MacroScripts
- Nitrous NPR Settings MacroScript
-
Provides dynamic controls over all aspects of the current NPR (Stylized) visual style
of the Nitrous Graphics Manager viewports.
- Viewport Shading Explorer MacroScript
-
Provides a User Interface to explore the advanced viewport shading settings like Ambient
Occlusion, Indirect Illumination, Depth Of Field etc. available when using Direct3D drivers in 3ds Max 2010 and higher.
- 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/RingSkinSelection
-
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