Share
 
 

Safe Scene Script Execution Blocked Commands

This topic lists all the commands blocked in embedded scripts by the Safe Scene Script Execution feature.

MAXScript Commands

When the Block MAXScript system commands option is selected under Safe Scene Execution on the Preference Settings dialog, the following MAXScript commands are prevented from executing when they are in embedded scripts:

  • cfgMgr.deleteKey
  • cfgMgr.deleteSection
  • cfgMgr.putFloat
  • cfgMgr.putFloatArray
  • cfgMgr.putInt
  • cfgMgr.putIntArray
  • cfgMgr.putString
  • createOLEObject
  • CustomFileStream.deleteStream
  • CustomFileStream.setStreamFlags
  • CustomFileStream.writeStream
  • CustomFileStream.writeStreamArray
  • DOSCommand
  • dragAndDrop.globalEnableDragAndDrop
  • dragAndDrop.enableDragAndDrop
  • dragAndDrop.dropPackage
  • dragAndDrop.downloadPackage
  • dragAndDrop.DownloadUrlToDisk
  • globalVars.remove
  • HiddenDOSCommand
  • internet.CheckConnection (if url: is specified)
  • LoadDllsFromDir
  • macros.load
  • macros.new
  • registerOLEInterface
  • registry.createKey
  • registry.deleteSubKey
  • registry.deleteKey
  • registry.deleteValue
  • registry.flushKey
  • registry.setValue
  • releaseAllOLEObjects
  • releaseOLEObject
  • SceneConverter.LoadConversionPreset
  • SetDir
  • ShellLaunch
  • systemTools.setEnvVariable
  • UIAccessor.CloseDialog
  • UIAccessor.PressDefaultButton
  • UIAccessor.PressButton
  • UIAccessor.PressButtonByName
  • UIAccessor.SetWindowText
  • UIAccessor.SendMessageID
  • UIAccessor.SendMessage
  • windows.postMessage
  • windows.sendMessage
Note: These commands are also blocked when called from scripts or script files executed within scene embedded scripts, for example when called from execute(), executeScriptFile(), fileIn(), readValue() or readExpr(). Commands are also blocked when contained in scripted Custom Attributes.

Display of a rollout that contains ActiveX or dotNet controls is blocked if its definition is in a scene embedded script.

The macroscript definition keyword is blocked.

These file methods are blocked in all cases:

  • deleteFile - blocked for all files except those under the 3ds Max Temp directory
  • removeDir - blocked for all directories except those under the 3ds Max Temp directory
  • openEncryptedFile
  • encryptScript
  • encryptFile
  • setFileAttribute

These internal only systemTools functions are blocked:

  • systemTools.AllocateMemory
  • systemTools.ReleaseMemory
  • systemTools.GenerateMiniDumpAndContinue
  • systemTools.SetMiniDumpContents
  • systemTools.PB2_AllNoRefSafePointersTestingDisabled
  • systemTools.PB2_AllNoRefSafePointersTestingDisable
  • systemTools.SetBigMiniDumpContents

Strings evaluated from getUserPropVal() are considered embedded scripts, and are blocked if they contain blocked commands. This happens regardless of whether getUserPropVal() itself is in an embedded script.

Functions blocked for specific extensions or files

These file methods are blocked from modifying protected files and files with protected extensions:

  • fopen (read-only open modes r, rt, and rb are always allowed)
  • openFile (read-only open modes r, rt, and rb are always allowed)
  • createFile
  • openLog
  • copyFile
  • renameFile
  • delIniSetting
  • setINISettings
The protected files are:
  • 3dsmax.ini
  • PackageContents.xml
  • Plugin.ini
  • Plugin.UserSettings.ini
  • PhotometricLightTemplates.ini
  • PhysicalMaterialTemplates.ini
  • custom 3dsmax.ini and plugin.ini files specified by command line arguments

The protected extensions are: .bashrc, .bat, .bin, .bmf, .bmi, .bms, .cmd, .com, .cpl, .dla, .dlb, .dlc, .dle, .dlf, .dlh, .dli, .dlk, .dll, .dlm, .dln, .dlo, .dlr, .dls, .dlt, .dlu, .dlv, .dlx, .dly, .dlz, .exe, .flt, .gadget, .gup, .inf1, .ins, .inx, .isu, .job, .jse, .lnk, .mcr, .ms, .msc, .mse, .msi, .msp, .mst, .mxs, .mzp, .paf, .pif, .ps1, .py, .pyc, .pyd, .pyo, .pyw, .reg, .res, .rgs, .scr, .sct, .shb, .shs, .u3p, .vb, .vb3, .vbs, .vbscript, .ws, .wsf, .wsh.

Note: 3ds Max sanitizes the file name and discards characters ignored by the operating system before determining if the file is blocked. For example, any trailing periods are discarded, so the file prefix ".ms..." is considered ".ms".

Special case file methods:

  • fileIn - blocked for all files with extensions other than .ms, .mse, and .mxs
  • executeScriptFile - blocked for all files with extensions other than .ms, .mse, and .mxs; also not blocked for .py and .pyw if the Block Python Scripts option is unchecked.

Protected File Locations

When Block MAXScript system commands is enabled, any command that can write to the filesystem is blocked from accessing these locations from which 3ds Max loads plugins and scripts:

  • The 3ds Max install directory
  • User Tools directory (typically C:\Users\<USER>\Autodesk\3ds Max <year>\User Tools)
  • The user script locations defined by Additional Scripts, Additional Startup Scripts, and Additional Macros in the Configure User and System Paths dialog (in MAXScript these are #userScripts, #userStartupScripts and #userMacros).
  • Plug-in related directory locations defined in plugin.ini, Plugin.usersettings.ini, or passed to 3ds Max on startup with the -p command-line option, or defined by the ADSK_APPLICATION_PLUGINS environment variable
  • The ProgramData directory (typically C:\ProgramData)
  • The %LOCALAPPDATA%\Autodesk\ApplicationPlugins\ directory

Python Commands

When the Block Python scripts option is selected under Safe Scene Execution on the Preference Settings dialog, all Python commands called from embedded scene scripts are blocked.

.NET Commands

When the Block 3rd Party .NET code option is selected under Safe Scene Execution on the Preferences Settings dialog, all .NET framework classes, including .NET controls, are blocked when run from embedded scene scripts, except those that are shipped with 3ds Max plug-ins or used by 3ds Max.

In addition, the MAXScript command dotNet.loadAssembly() is blocked.

This is the list of allowed (whitelisted) .NET types, everything else is blocked:

  • Autodesk.Max.IILayer
  • Autodesk.Max.MaxPlus.AColor
  • Autodesk.Max.MaxPlus.AffineParts
  • Autodesk.Max.MaxPlus.AngAxis
  • Autodesk.Max.MaxPlus.Animatable
  • Autodesk.Max.MaxPlus.Axis
  • Autodesk.Max.MaxPlus.BaseObject
  • Autodesk.Max.MaxPlus.BezierShape
  • Autodesk.Max.MaxPlus.BitArray
  • Autodesk.Max.MaxPlus.Box2
  • Autodesk.Max.MaxPlus.Box3
  • Autodesk.Max.MaxPlus.Class_ID
  • Autodesk.Max.MaxPlus.Color
  • Autodesk.Max.MaxPlus.Color64
  • Autodesk.Max.MaxPlus.HDRColor
  • Autodesk.Max.MaxPlus.INode
  • Autodesk.Max.MaxPlus.INodeTab
  • Autodesk.Max.MaxPlus.Interval
  • Autodesk.Max.MaxPlus.IPoint2
  • Autodesk.Max.MaxPlus.IPoint3
  • Autodesk.Max.MaxPlus.MappingChannel
  • Autodesk.Max.MaxPlus.Math
  • Autodesk.Max.MaxPlus.Matrix3
  • Autodesk.Max.MaxPlus.Matrix3+<get_Columns>d__6
  • Autodesk.Max.MaxPlus.Matrix3+<get_Columns>d__8
  • Autodesk.Max.MaxPlus.Matrix3+<get_Rows>d__6
  • Autodesk.Max.MaxPlus.Matrix3+<get_Rows>d__8
  • Autodesk.Max.MaxPlus.Matrix3+d__6
  • Autodesk.Max.MaxPlus.Matrix3+d__8
  • Autodesk.Max.MaxPlus.Mesh
  • Autodesk.Max.MaxPlus.Mtl
  • Autodesk.Max.MaxPlus.MtlBase
  • Autodesk.Max.MaxPlus.Object
  • Autodesk.Max.MaxPlus.Point
  • Autodesk.Max.MaxPlus.Point2
  • Autodesk.Max.MaxPlus.Point3
  • Autodesk.Max.MaxPlus.Point4
  • Autodesk.Max.MaxPlus.Quat
  • Autodesk.Max.MaxPlus.Ray
  • Autodesk.Max.MaxPlus.Rect
  • Autodesk.Max.MaxPlus.ReferenceMaker
  • Autodesk.Max.MaxPlus.ReferenceTarget
  • Autodesk.Max.MaxPlus.ScaleValue
  • Autodesk.Max.MaxPlus.Texmap
  • Autodesk.Max.MaxPlus.WStr
  • Autodesk.Max.StateSets.ActionItems.ExportSelectedToCompositorLink
  • Autodesk.Max.StateSets.CompositorLink.CompositorLinkSettingsController
  • Autodesk.Max.StateSets.CompositorLink.IntermediateScene
  • Autodesk.Max.StateSets.CompositorLink.IntermediateScene+Camera
  • Autodesk.Max.StateSets.CompositorLink.IntermediateScene+Key
  • Autodesk.Max.StateSets.CompositorLink.IntermediateScene+KeyCollection
  • Autodesk.Max.StateSets.CompositorLink.IntermediateScene+Null
  • Autodesk.Max.StateSets.CompositorLink.IntermediateScene+Vector3
  • Autodesk.Max.StateSets.CompositorLink.IntermediateScene+VideoSequence
  • Autodesk.Max.StateSets.CompositorLink.IntermediateScene+VideoSequenceGroup
  • Autodesk.Max.StateSets.Configuration
  • Autodesk.Max.StateSets.Configuration+GeneralOptions
  • Autodesk.Max.StateSets.Entities.EntityManager
  • Autodesk.Max.StateSets.Entities.Root
  • Autodesk.Max.StateSets.Entities.StateSets.Master
  • Autodesk.Max.StateSets.Entities.StateSets.Nodes.DynamicObjectCollection
  • Autodesk.Max.StateSets.Entities.StateSets.Nodes.LayerCollection
  • Autodesk.Max.StateSets.Entities.StateSets.Nodes.ObjectCollection
  • Autodesk.Max.StateSets.Entities.StateSets.Rendering.Parameter
  • Autodesk.Max.StateSets.Entities.StateSets.Rendering.RenderOptionsState
  • Autodesk.Max.StateSets.Entities.StateSets.Rendering.State
  • Autodesk.Max.StateSets.Entities.StateSets.Scripted
  • Autodesk.Max.StateSets.Entities.StateSets.SetupRenderOutputs
  • Autodesk.Max.StateSets.Entities.StateSets.StateSet
  • Autodesk.Max.StateSets.Entities.StateSets.Viewports.Viewport
  • Autodesk.Max.StateSets.Entities.Texmaps.Composite
  • Autodesk.Max.StateSets.Entities.Texmaps.Composite+BlendMode
  • Autodesk.Max.StateSets.Entities.Texmaps.Composite+LayerEntity
  • Autodesk.Max.StateSets.Entities.View
  • Autodesk.Max.StateSets.Plugin
  • Autodesk.Max.StateSets.StateSetsListControl
  • Autodesk.Max.StateSets.Views.Schematic
  • Autodesk.Max.StateSets.Views.Tree
  • Autodesk.Sequences.*
  • Ephere.Gui.NodeViews.Controls.CheckBox
  • Ephere.Gui.NodeViews.Controls.FilePicker
  • Ephere.Gui.NodeViews.Controls.ListBox
  • Ephere.Gui.NodeViews.Controls.RangeSelector
  • Ephere.Gui.NodeViews.Controls.TextBox
  • Ephere.Gui.NodeViews.NodeView+Node+NodeCollection
  • Ephere.Gui.NodeViews.NodeView+NodeCollection
  • Ephere.Gui.NodeViews.NodeView+SelectionCollection
  • Ephere.Gui.NodeViews.Schematic+RollupNode
  • Ephere.Gui.NodeViews.Schematic+SchematicNode
  • Ephere.Gui.NodeViews.Schematic+ValueNode
  • Ephere.Gui.NodeViews.Tree+TreeNode
  • Microsoft.Xna.Framework.Matrix
  • Microsoft.Xna.Framework.Plane
  • Microsoft.Xna.Framework.Quaternion
  • Microsoft.Xna.Framework.Vector2
  • Microsoft.Xna.Framework.Vector3
  • Microsoft.Xna.Framework.Vector4
  • ProceduralContentActions.PCActionCreateCompoundFromMesh
  • ProceduralContentActions.PCGraphEditorBridge
  • System.Action
  • System.Array
  • System.Boolean
  • System.Byte
  • System.Char
  • System.CharEnumerator
  • System.Collections.Generic.Dictionary`2
  • System.Collections.Generic.HashSet`1
  • System.Collections.Generic.ICollection`1
  • System.Collections.Generic.IComparer'1
  • System.Collections.Generic.IEnumerable`1
  • System.Collections.Generic.IList`1
  • System.Collections.Generic.List`1
  • System.Collections.Hashtable
  • System.Collections.Hashtable+KeyCollection
  • System.Collections.Hashtable+ValueCollection
  • System.Collections.ICollection
  • System.Collections.IDictionary
  • System.Collections.Specialized.StringCollection
  • System.DateTime
  • System.DateTimeKind // enum
  • System.DayOfWeek // enum
  • System.Decimal
  • System.Double
  • System.Drawing.Bitmap
  • System.Drawing.Color
  • System.Drawing.ContentAlignment // enum
  • System.Drawing.Drawing2D.CompositingMode
  • System.Drawing.Drawing2D.CompositingQuality
  • System.Drawing.Drawing2D.SmoothingMode
  • System.Drawing.Drawing2D.PixelOffsetMode
  • System.Drawing.Drawing2D.InterpolationMode
  • System.Drawing.Drawing2D.Matrix
  • System.Drawing.Font
  • System.Drawing.FontFamily
  • System.Drawing.FontStyle // enum
  • System.Drawing.Graphics
  • System.Drawing.GraphicsUnit // enum
  • System.Drawing.Icon
  • System.Drawing.Image
  • System.Drawing.Imaging.PixelFormat // enum
  • System.Drawing.KnownColor // enum
  • System.Drawing.Point
  • System.Drawing.PointF
  • System.Drawing.Rectangle
  • System.Drawing.RectangleF
  • System.Drawing.Region
  • System.Drawing.Size
  • System.Drawing.SizeF
  • System.Drawing.Text.TextRenderingHint
  • System.Environment+SpecialFolder // enum
  • System.Exception
  • System.Func
  • System.Globalization.Calendar
  • System.Globalization.CalendarAlgorithmType // enum
  • System.Globalization.CalendarWeekRule // enum
  • System.Globalization.CompareInfo
  • System.Globalization.CompareOptions // enum
  • System.Globalization.CultureInfo
  • System.Globalization.CultureTypes // enum
  • System.Globalization.DateTimeFormatFlags
  • System.Globalization.DateTimeFormatInfo
  • System.Globalization.DateTimeStyles // enum
  • System.Globalization.DigitShapes // enum
  • System.Globalization.GregorianCalendar
  • System.Globalization.GregorianCalendarTypes // enum
  • System.Globalization.NumberFormatInfo
  • System.Globalization.NumberStyles // enum
  • System.Globalization.RegionInfo
  • System.Globalization.SortVersion
  • System.Globalization.TextInfo
  • System.Globalization.TimeSpanStyles // enum
  • System.Globalization.UnicodeCategory // enum
  • System.Guid
  • System.Int16
  • System.Int32
  • System.Int64
  • System.IntPtr
  • System.MidpointRounding // enum
  • System.Object
  • System.Object[]
  • System.RuntimeType
    Note: System.RuntimeType instances can be wrapped only for other classes in the allowed list.
  • System.SByte
  • System.Single
  • System.String
  • System.StringComparison // enum
  • System.StringSplitOptions // enum
  • System.Text.ASCIIEncoding
  • System.Text.DecoderExceptionFallback
  • System.Text.DecoderFallback
  • System.Text.DecoderReplacementFallback
  • System.Text.EncoderExceptionFallback
  • System.Text.EncoderFallback
  • System.Text.EncoderReplacementFallback
  • System.Text.Encoding
  • System.Text.EncodingInfo
  • System.Text.EncodingProvider
  • System.Text.InternalDecoderBestFitFallback
  • System.Text.InternalEncoderBestFitFallback
  • System.Text.NormalizationForm // enum
  • System.Text.RegularExpressions.Capture
  • System.Text.RegularExpressions.CaptureCollection
  • System.Text.RegularExpressions.Group
  • System.Text.RegularExpressions.GroupCollection
  • System.Text.RegularExpressions.Match
  • System.Text.RegularExpressions.MatchCollection
  • System.Text.RegularExpressions.MatchEvaluator
  • System.Text.RegularExpressions.Regex
  • System.Text.RegularExpressions.RegexCompilationInfo
  • System.Text.RegularExpressions.RegexOptions // enum
  • System.Text.SBCSCodePageEncoding
  • System.Text.StringBuilder
  • System.Text.UnicodeEncoding
  • System.Text.UTF32Encoding
  • System.Text.UTF7Encoding
  • System.Text.UTF7Encoding+DecoderUTF7Fallback
  • System.Text.UTF8Encoding
  • System.TimeSpan
  • System.Tuple'2
  • System.Type
  • System.TypeCode // enum
  • System.UInt16
  • System.UInt32
  • System.UInt64
  • System.Windows.Controls.ItemCollection
  • System.Windows.Forms.AccessibleObject
  • System.Windows.Forms.AccessibleRole // enum
  • System.Windows.Forms.AccessibleStates // enum
  • System.Windows.Forms.AnchorStyles // enum
  • System.Windows.Forms.AutoCompleteMode // enum
  • System.Windows.Forms.AutoCompleteSource // enum
  • System.Windows.Forms.AutoCompleteStringCollection
  • System.Windows.Forms.AutoSizeMode // enum
  • System.Windows.Forms.BorderStyle // enum
  • System.Windows.Forms.BoundsSpecified // enum
  • System.Windows.Forms.Button
  • System.Windows.Forms.ButtonBase+ButtonBaseAccessibleObject
  • System.Windows.Forms.CharacterCasing // enum
  • System.Windows.Forms.ColorDepth // enum
  • System.Windows.Forms.ColumnHeader // enum
  • System.Windows.Forms.ColumnHeaderStyle // enum
  • System.Windows.Forms.Control
  • System.Windows.Forms.Control+AxSourcingSite
  • System.Windows.Forms.Control+ControlAccessibleObject
  • System.Windows.Forms.Control+ControlCollection
  • System.Windows.Forms.Control+ControlNativeWindow
  • System.Windows.Forms.ControlBindingsCollection
  • System.Windows.Forms.Cursor
  • System.Windows.Forms.DataSourceUpdateMode // enum
  • System.Windows.Forms.DialogResult // enum
  • System.Windows.Forms.DockStyle // enum
  • System.Windows.Forms.DragDropEffects // enum
  • System.Windows.Forms.FlatButtonAppearance
  • System.Windows.Forms.FlatStyle // enum
  • System.Windows.Forms.FolderBrowserDialog
  • System.Windows.Forms.GetChildAtPointSkip // enum
  • System.Windows.Forms.HorizontalAlignment // enum
  • System.Windows.Forms.HScrollProperties
  • System.Windows.Forms.ImageLayout // enum
  • System.Windows.Forms.ImageList
  • System.Windows.Forms.ImageList+ImageCollection
  • System.Windows.Forms.ImeMode // enum
  • System.Windows.Forms.ItemActivation // enum
  • System.Windows.Forms.Keys // enum
  • System.Windows.Forms.Layout.DefaultLayout
  • System.Windows.Forms.ListView
  • System.Windows.Forms.ListView+CheckedIndexCollection
  • System.Windows.Forms.ListView+CheckedListViewItemCollection
  • System.Windows.Forms.ListView+ColumnHeaderCollection
  • System.Windows.Forms.ListView+ListViewItemCollection
  • System.Windows.Forms.ListView+SelectedIndexCollection
  • System.Windows.Forms.ListView+SelectedListViewItemCollection
  • System.Windows.Forms.ListViewAlignment // enum
  • System.Windows.Forms.ListViewGroupCollection
  • System.Windows.Forms.ListViewInsertionMark
  • System.Windows.Forms.ListViewItem
  • System.Windows.Forms.ListViewItem+ListViewSubItem
  • System.Windows.Forms.ListViewItem+ListViewSubItemCollection
  • System.Windows.Forms.MouseButtons // enum
  • System.Windows.Forms.Padding
  • System.Windows.Forms.ProgressBar
  • System.Windows.Forms.ProgressBarStyle // enum
  • System.Windows.Forms.RightToLeft // enum
  • System.Windows.Forms.ScrollableControl+DockPaddingEdges
  • System.Windows.Forms.ScrollBars // enum
  • System.Windows.Forms.SortOrder // enum
  • System.Windows.Forms.TabAlignment // enum
  • System.Windows.Forms.TabAppearance // enum
  • System.Windows.Forms.TabControl
  • System.Windows.Forms.TabControl+ControlCollection
  • System.Windows.Forms.TabControl+TabPageCollection
  • System.Windows.Forms.TabDrawMode // enum
  • System.Windows.Forms.TabPage
  • System.Windows.Forms.TabPage+TabPageControlCollection
  • System.Windows.Forms.TabSizeMode // enum
  • System.Windows.Forms.TextBox
  • System.Windows.Forms.TextImageRelation // enum
  • System.Windows.Forms.Timer
  • System.Windows.Forms.TreeNode
  • System.Windows.Forms.TreeNodeCollection
  • System.Windows.Forms.TreeView
  • System.Windows.Forms.TreeViewDrawMode // enum
  • System.Windows.Forms.View
  • System.Windows.Forms.VScrollProperties
  • Viper3dsMaxBridge.ColorControllerPlugin
  • Viper3dsMaxBridge.FloatControllerPlugin
  • Viper3dsMaxBridge.FloatList
  • Viper3dsMaxBridge.GeometryPluginInstance
  • Viper3dsMaxBridge.INodeList
  • Viper3dsMaxBridge.Main
  • Viper3dsMaxBridge.Main+McgFileExtensions
  • Viper3dsMaxBridge.MAXScriptFunctionPlugin
  • Viper3dsMaxBridge.ModifierPluginInstance
  • Viper3dsMaxBridge.Point3ControllerPlugin
  • Viper3dsMaxBridge.Point4ControllerPlugin
  • Viper3dsMaxBridge.PositionControllerPlugin
  • Viper3dsMaxBridge.RotationControllerPlugin
  • Viper3dsMaxBridge.ScaleControllerPlugin
  • Viper3dsMaxBridge.Settings
  • Viper3dsMaxBridge.ShapePluginInstance
  • Viper3dsMaxBridge.TransformControllerPlugin
  • Viper3dsMaxBridge.UtilityPluginInstance
  • ViperEngine.ViperGraph

Was this information helpful?