Package autodesk_toxik :: Module admin
[frames] | no frames]

Module admin

Administration module.

This module provides hooks to create and modify Composite project, user and machine preferences. It also provides access and search mechanisms for Composite components (compositions, composition versions, etc) through a virtual file system: the library manager.

Project, User and Machine Management

Composite has three types of administrable that defines preferences used in the application: Project (".txproject" file), User (".txuser" file) and Machine (".txmachine" file), which all derive from a common base class: Administrable.

Those administrables are managed through their respective manager class: ProjectMgr, UserMgr and MachineMgr (even though they share a common interface, there is no base class for those manager classes).

Functions
str
getAbsolutePath(path)
Returns: The absolute path of a file for the given relative (or absolute) path.
str
statStr(libmgr, path)
Returns: A string representation of the output of stat for printout.
 
setUDA(componentPath, udaName, udaValue)
Convenience function that creates a UDA if it doesn't exist in the current project and sets its value on the specified component.
Function Details

getAbsolutePath(path)

 
Parameters:
  • path (str)
Returns: str
The absolute path of a file for the given relative (or absolute) path. A relative path is assumed to be located under the root folder of the current project. If there's no project currently opened, the path is made absolute based on the current working directory.

statStr(libmgr, path)

 
Parameters:
  • libmgr (LibraryMgr)
  • path (str)
Returns: str
A string representation of the output of stat for printout.

setUDA(componentPath, udaName, udaValue)

 

Convenience function that creates a UDA if it doesn't exist in the current project and sets its value on the specified component.

Parameters:
  • componentPath (str)
  • udaName (str)
  • udaValue (str)