App Class

From Derivative
Revision as of 12:13, 29 April 2018 by Markus Heckmann (talk | contribs)
Jump to: navigation, search

This class contains specific application details, such as its version and installation folders. It can be accessed with the app object, found in the automatically imported td module.

NOTE: See also Variables and Dialogs -> Variables where more built-in paths and strings are available via expressions in the form var('DESKTOP'), var('MYDOCUMENTS') and var('TOENAME').


Members[edit]

architecturestr (Read Only):

The architecture of the compile. Generally 32 or 64 bit.

binFolderstr (Read Only):

Installation folder containing the binaries.

buildstr (Read Only):

Application build number.

compileDatetuple(year, month, day) (Read Only):

The date the application was compiled, expressed as a tuple (year, month, day).

configFolderstr (Read Only):

Installation folder containing configuration files.

desktopFolderstr (Read Only):

Current user's desktop folder.

enableOptimizedExprsbool (Read Only):

Get or set if Python expression optimization is enabled. Defaults to True every time TouchDesigner starts.

installFolderstr (Read Only):

Main installation folder.

launchTimefloat (Read Only):

Total time required to launch and begin playing the toe file, measured in seconds.

osNamestr (Read Only):

The operating system name.

osVersionstr (Read Only):

The operating system version.

powerbool :

Get or set the overall processing state of the process. When True, processing is enabled. When False processing is halted. This is identical to pressing the power button on the main interface. This has a greater effect than simply pausing or stopping the playbar.

app.power = False #turn off the power button.

preferencesFolderstr (Read Only):

Folder where the preferences file is located.

productstr (Read Only):

Application name. For example, 'TouchDesigner', 'TouchPlayer'. See also licences.type in Licences Class.

recentFileslist :

Get or set the list of most recently saved or loaded files.

samplesFolderstr (Read Only):

Installation folder containing configuration files.

userPaletteFolderstr (Read Only):

Folder where custom user palettes are located.

versionstr (Read Only):

Application version number.

Methods[edit]

removeNonCommercialLimit(password)bool:

Removes the restriction previously added. Returns True if successful.

  • password - (Keyword) Password previously used when restriction added.
app.removeNonCommercialLimit('secret123')

addNonCommercialLimit(password)None:

Limits the application to operate at non-commercial license level. Multiple calls can be made, but each can be undone with a matching removeNonCommercialLimit(password). If the password is blank the operation cannot be undone.

  • password - (Keyword, Optional) Password to later remove the restriction.
app.addNonCommercialLimit('secret123')  #undoable with password
app.addNonCommercialLimit()  #permanent during length of session.

removeResolutionLimit(password)bool:

Removes the restriction previously added. Returns True if successful.

  • password - (Keyword) Password previously used when restriction added.
app.removeResolutionLimit('secret123')

addResolutionLimit(x,y password)None:

Limits all textures to the specified amount. Multiple calls can be made, but each can be undone with a matching removeResolutionLimit(password). The final resolution limit will be the minimum of all calls. If the password is blank the operation cannot be undone.

  • x - Width of maximum texture resolution, measured in pixels.
  • y - Height of maximum texture resolution, measured in pixels.
  • password - (Keyword, Optional) Password to later remove the restriction.
app.addResolutionLimit(600, 480, 'secret123')  #undoable with password
app.addResolutionLimit()  #permanent during length of session.


The operating system's holder of files and other folders (directories). It does not refer to operators within TouchDesigner. See .