Path Aliases

From The Foundry MODO SDK wiki
Jump to: navigation, search

Path Aliases

modo supports arbitrary path aliases through the Path Alias preferences. These aliases provide OS-agnostic shortcuts to location in the file system. Each alias is in the form of alias: (note the colon symbol after the alias), and resolves to an absolute path. These are commonly used to provide custom mappings so that content can easily be shared between users. Path aliases are stored in configs.

Scripts and plug-ins can resolve path aliases into their absolute paths through the platformservice ScriptQuery interface.

Standard Paths

modo uses a number of standard paths for its configuration files, content, help and other resources. These are detailed in the Path Aliases: Standard Paths article.

Adding Aliases to a Config File

<atom type="PathAliases">
  <hash type="Alias" key="pathAliasName">
    <atom type="Path">C:\path\to\desired\folder</atom>

Querying Path Aliases

 # python
 fileService = lx.service.File()
 aliasPath = fileService.ToLocalAlias('pathAliasName:')

 query platformservice alias ? "pathAliasName:"

More Information