Topic: version 4 MAXScript Language Improvements/Language Improvements
The validModifier() function improved so that it will take a modifier class in place of a modifier to preclude the need to create a modifier to do the test.
validModifier <node_or_node_collection> <mod_or_mod_class>
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.
See also