Share

Interface: SceneScriptSecurityManager

New in 3ds Max 2022: This interface exposes some of the functionality of the Safe Scene Script Execution feature. Specifically, this interface supports obtaining information about the state of Safe Scene Script Execution, but not setting any parameters for the feature. For security reasons, the feature can only be controlled through the user interface, command-line and environment variables.

See the Safe Scene Script Execution topic in the 3ds Max User Guide for more information about what these settings mean for scene embedded scripts. See the Blocked Commands topic for a list of commands that are blocked for each language option (Python, .NET, and MAXScript).

See the Interface : SecurityTools topic for methods that control Malware Protection settings.

Methods:

    <boolean>IsSafeSceneScriptExecutionEnabled <enum>setting
       setting enums: {#Current|#Pending}

Returns true if the Safe Scene Execution feature is enabled for the given setting. The possible values for setting are:

  • #Current - returns the setting for the current running session of 3ds Max.
  • #Pending - returns the setting for the next running session of 3ds Max. When a user changes the Safe Scene Script Execution settings, the changes do not take effect until the next time 3ds Max starts, so this setting may be different than the current running session setting.
    <boolean>IsSceneScriptExecutionBlocked <enum>feature <enum>setting
       feature enums: {#Python|#DotNet|#MAXScriptSystemCommands}
       setting enums: {#Current|#Pending}

Returns true if the type of command specified by feature is blocked for the given setting. The possible values for feature are:

  • #Python - Gets the setting for Python
  • #DotNet - Gets the setting for dotNet commands
  • #MAXScriptSystemCommands - Gets the setting for MAXScript commands

The possible values for setting are:

  • #Current - returns the setting for the current running session of 3ds Max.
  • #Pending - returns the setting for the next running session of 3ds Max. When a user changes the Safe Scene Script Execution settings, the changes do not take effect until the next time 3ds Max starts, so this setting may be different than the current running session setting.
    <boolean>IsShowSecurityMessagesWindowOnBlockedCommandsEnabled()

Returns whether the Notify me about blocked commands setting is enabled.

    <boolean>IsShowScriptEditorOnBlockedCommandsEnabled()

Returns whether the Display script editor on blocked commands setting is enabled.

    <boolean>IsProtectedINIFile <filename>filename

Returns whether the specified file is considered a write-protected configuration file, meaning that it cannot be modified or created.

    <boolean>IsProtectedFileBasedOnExtension <filename>filename

Returns whether the specified file is write protected based on its extension, meaning that it cannot be modified or created.

    <boolean>AreSettingsLocked()

Returns whether settings are locked.

    <enum>GetCauseOfLock()
       GetCauseOfLock enums: {#NotLocked|#CmdLine|#EnvVar|#Registry}

Returns the current locked status of the security settings, where:

  • #NotLocked - not locked
  • #CmdLine - locked by the -safescene command line switch
  • #EnvVar - locked by the ADSK_3DSMAX_SAFE_SCENE environment variable
  • #Registry - locked by the SAFESCENE registry setting
    <boolean>IsSafeScriptAssetExecutionEnabled()

Returns false if script assets are excluded from Safe Scene Script execution policies, true if they are not.

Was this information helpful?