Interfaces > Core Interfaces > WorkspaceManager |
The WorkspaceManager Core Interface exposes the features of the Manage Workspaces dialog to MAXScript.
Available in 3ds Max 2013 and higher.
<bool>WorkspaceManager.CreateNewWorkspace <string>identifier <string>friendlyName
Creates a new Workspace with identifier string specified by the first argument and a user-friendly name specified by the second argument.
Returns True on success, False on failure.
<integer>WorkspaceManager.GetWorkspaceCount()
Returns the number of Workspaces.
<string>WorkspaceManager.GetWorkspaceIdentifier <index>index
Returns the Identifier of the indexed Workspace.
<string>WorkspaceManager.GetWorkspaceName <index>index
Returns the User-friendly Name of the indexed Workspace.
<string>WorkspaceManager.GetWorkspaceNameWithIdentifier <string>identifier
Returns the User-friendly Name of the Workspace with the given identifier string.
<string>WorkspaceManager.GetCurrentWorkspaceIdentifier()
Returns the identified or the current Workspace.
<bool>WorkspaceManager.SetCurrentWorkspaceByIdentifier <string>identifier
Sets the current Workspace to the one with the given identifier string.
Returns True on of the Workspace was set successfully, False if the identifier does not exist.
<bool>WorkspaceManager.DeleteWorkspace <string>identifier
Deletes the Workspace with the given identifier.
Returns True if the Workspace was deleted successfully, False if the identifier does not exist.
<String by value>WorkspaceManager.GetWriteDirectory()
Returns the Workspace storage path.
<bool>WorkspaceManager.SetWorkspaceName <index>index <string>name
Sets the name of the indexed Workspace to the name specified by the second argument.
Returns True on success, False on failure.
<bool>WorkspaceManager.SetWorkspaceNameWithIdentifier <string>identifier <string>name
Sets the identifier string of the indexed Workspace to the name specified by the second argument.
Returns True on success, False on failure.
<bool>WorkspaceManager.ResetToDefaults <string>identifier
Resets the Workspace with the specified identifier string to defaults.
Returns True on success, False if the Workspace does not exist.
<bool>WorkspaceManager.GetRunScript <string>identifier
Returns the state of the Run Script option for the Workspace with the given identifier.
When it is True, the Entry and Exit Scripts associated with the Workspace will be executed.
When set to False, the scripts will be ignored.
<void>WorkspaceManager.ToggleRunScript <string>identifier
Toggles the Run Script option of the Workspace with the given identifier.
This can be used together with WorkspaceManager.GetRunScript to change the state of the option.
For example, to turn the option on, you can check if it is currently set to False and toggle it if it is.
EXAMPLE |
theWS = WorkspaceManager.GetWorkspaceIdentifier 1 if not (WorkspaceManager.GetRunScript theWS) do WorkspaceManager.ToggleRunScript theWS |
<filename>WorkspaceManager.GetEntryScript <string>identifier
Returns the filename of the Entry Script associated with the Workspace with the given identifier.
The Entry Script is a MAXScript which is executed when the Workspace is loading.
<bool>WorkspaceManager.SetEntryScript <string>identifier <filename>script
Associates the Entry Script filename specified by the second argument with the Workspace given by the identifier passed as first argument.
Returns True on success, False if the identifier does not represent an existing Workspace.
Note that this method does not check whether the specified script is valid or even exists at the specified path.
<filename>WorkspaceManager.GetExitScript <string>identifier
Returns the filename of the Exit Script associated with the Workspace with the given identifier.
The Exit Script is a MAXScript that is executed when the Workspace is exiting due to another Workspace being loaded.
<bool>WorkspaceManager.SetExitScript <string>identifier <filename>script
Associates the Exit Script filename specified by the second argument with the Workspace given by the identifier passed as first argument.
Returns True on success, False if the identifier does not represent an existing Workspace.
Note that this method does not check whether the specified script is valid or even exists at the specified path.
<integer>WorkspaceManager.GetAllSubsystemsCount()
Returns the number of all sub-systems.
<string>WorkspaceManager.GetSubsystemName <index>index
Returns the name of the indexed sub-system.
<bool>WorkspaceManager.IsSubsystemSaving <string>identifier <string>subSystemIdentifier
Returns True if the sub-system specified by name by the first argument will be saved when the Workspace with the identifier given by the second argument is saving, False otherwise.
<bool>WorkspaceManager.ToggleSubsystemSaving <string>identifier <string>subSystemIdentifier
Toggles whether the indexed sub-system specified by the first argument will be saved when the Workspace with the identifier given by the second argument is saving.
<bool>WorkspaceManager.IsSystemWorkspace <string>identifier
Returns True if the Workspace specified by the given identifier is a system workspace, False if it is not.