[Closed] Undocumented MAXScript Features
I’ve compiled a list of useful undocumented stuff, started writing it as a simple post but the code formatting here kept breaking and the whole piece got rather lengthy so I made a blogpost out of it:
Undocumented MAXScript Features
Here’s the Box3 Value type as a small appetizer:
Enjoy.
Thank you.
From many years I use undocumented Edit Poly methods listed here: http://www.illusioncatalyst.com/3dsmax_files/snippets/edit_poly_undoc.php
Those are listed, too. I first saw the listing by Eric Craft (PiXeL_MoNKeY) IIRC. Anyway, will include this link as well since it has descriptions and examples, thank you
Here is another one to eluded me for years. Xref Scene overlay is available, but undocumented and I couldn’t find it listed in any method or interface list.
<XRefScene>.overlay Boolean default:false
-Eric
Is there any information about Edit Mesh modifier, as the Autodesk help file is useless in that regard: http://help.autodesk.com/view/3DSMAX/2016/ENU/?guid=__files_GUID_2D34BEBA_4DF3_4EC7_8E8E_4477DB6D954C_htm
Things like setfaceMatID doesn’t seem work when you work with the modifier on a primitive, only with editable mesh.
Depending on what’s the goal, you might be better of using simpleMeshMod instead where most of the methods for TriMesh manipulation work.
The description goes on to list all the possible filterName flags, but what it doesn’t mention is that you don’t have to set/clear them one by one. These methods accept any number of arguments for the flags. They error out on wrong filterNames, but it’s convenient that they don’t error out if any number of undefined’s are passed among the arguments.
So the following are valid calls:
trackviews.current.clearFilter #all
trackviews.current.setFilter #position #rotation #scale
trackviews.current.setFilter #scale undefined #scaleX #scaleY undefined undefined \
undefined undefined undefined undefined undefined undefined undefined #blue
I want to use this thread to share a bug(s) I found. We can call it “wrongly documented” feature
check the MXS Help:
qsort <array> <function> [start:<integer>] [end:<integer>] [user-defined key args passed to function]
bsearch <key> <array> <function> [start:<integer>] [end:<integer>] [index:&variable] [user-defined key args passed to function]
all optional arguments for both cases work only if you use a mxs function, and throw an error if try to use any built-in or generic.
see:
arr = for k=1 to 100 collect (random 0 1000) as string
qsort arr stricmp start:10 end:50
-- Argument count error: _tcsicmp wanted 2, got 7
-- but...
fn compstr s1 s2 = stricmp s1 s2
qsort arr compstr start:10 end:50
OK
the same issue with bsearch