Difference between revisions of "Td Module"

From Derivative
Jump to navigation Jump to search
Line 117: Line 117:
 
}}
 
}}
 
{{ClassMember
 
{{ClassMember
     |class=tdu
+
     |class=td
     |name=me
+
     |name=project
     |type=OP
+
     |type=project
 
     |set=0
 
     |set=0
     |text=Reference to the current operator that is being executed or evaluated. This can be used in parameter expressions, or DAT scripts.
+
     |text=Reference to the project session.
 
}}
 
}}
 
{{ClassMember
 
{{ClassMember
     |class=tdu
+
     |class=td
     |name=me
+
     |name=root
 
     |type=OP
 
     |type=OP
 
     |set=0
 
     |set=0
     |text=Reference to the current operator that is being executed or evaluated. This can be used in parameter expressions, or DAT scripts.
+
     |text=Reference to the topmost root operator.
 
}}
 
}}
 
{{ClassMember
 
{{ClassMember
     |class=tdu
+
     |class=td
     |name=me
+
     |name=runs
     |type=OP
+
     |type=runs
 
     |set=0
 
     |set=0
     |text=Reference to the current operator that is being executed or evaluated. This can be used in parameter expressions, or DAT scripts.
+
     |text=Reference to the runs object, which contains delayed executions.
 
}}
 
}}
 
{{ClassMember
 
{{ClassMember
     |class=tdu
+
     |class=td
     |name=me
+
     |name=sysinfo
     |type=OP
+
     |type=sysinfo
 
     |set=0
 
     |set=0
     |text=Reference to the current operator that is being executed or evaluated. This can be used in parameter expressions, or DAT scripts.
+
     |text=Reference to the system information.
 
}}
 
}}
 
{{ClassMember
 
{{ClassMember
     |class=tdu
+
     |class=td
     |name=me
+
     |name=ui
     |type=OP
+
     |type=ui
 
     |set=0
 
     |set=0
     |text=Reference to the current operator that is being executed or evaluated. This can be used in parameter expressions, or DAT scripts.
+
     |text=Reference to the ui options.
 
}}
 
}}
  
 
}}
 
}}

Revision as of 10:57, 2 October 2017


The td module is the main module containing all application related classes and objects. It is imported by default when the application launches.


Members[edit]

meOP (Read Only):

Reference to the current operator that is being executed or evaluated. This can be used in parameter expressions, or DAT scripts.

absTimeabsTime (Read Only):

Reference to the AbsTime object.

appapp (Read Only):

Reference to the application installation.

extext (Read Only):

Reference to the extension searching object. See extensions for more information.

familiesdict (Read Only):

A dictionary containing a list of operator types for each operator family. Example: for a in families['SOP']:

licenseslicenses (Read Only):

Reference to the currently installed licences.

modmod (Read Only):

Reference to the Module On Demand object.

monitorsmonitors (Read Only):

Reference to the group of available monitors.

opOP (Read Only):

The OPFinder object, for accessing operators through paths or shortcuts.

Note: a version of this method that searches relative to a specific operator is also in OP Class.

op(pattern1, pattern2...) → OP or None

Returns the first OP whose path matches the given pattern, relative to the current OP, or None if nothing is found. Multiple patterns may be specified which are all added to the search. Numeric OP ids may also be used.

  • pattern - Can be string following the Pattern Matching rules, specifying which OP to return, or an integer, which must be an OP Id. Multiple patterns can be given, the first matching OP will be returned.
b = op('project1')
b = op('foot*', 'hand*')
b = op(154)

op.shortcut → OP

An operator specified with by a shortcut. If no operator exists an exception is raised. These shortcuts are global, and must be unique. That is, cutting and pasting an operator with a Global OP Shortcut specified will lead to a name conflict. One shortcut must be renamed in that case. Furthermore, only components can be given Global OP Shortcuts.

  • shortcut - Corresponds to the Global OP Shortcut parameter specified in the target operator.
b = op.Videoplayer # or alternatively op.Videoplayer, as its not relative to this operator.

To list all Global OP Shortcuts:

for x in op:
	print(x)

parentOP (Read Only):

The ParentFinder object, for accessing parent components through indices or shortcuts.

Note: a version of this method that searches from a specific operator is also in OP Class.

parent(n) → OP or None

The nth parent of the current operator. If n not specified, returns the parent. If n = 2, returns the parent of the parent, etc. If no parent exists at that level, None is returned.

  • n - (Optional) n is the number of levels up to climb. When n = 1 it will return the operator's parent.
p = parent(2) #grandfather

parent.shortcut → OP

A parent component specified with a shortcut. If no parent exists an exception is raised.

  • shortcut - Corresponds to the Parent Shortcut parameter specified in the target parent.
   n = parent.Videoplayer

See also Parent Shortcut for more examples.

projectproject (Read Only):

Reference to the project session.

rootOP (Read Only):

Reference to the topmost root operator.

runsruns (Read Only):

Reference to the runs object, which contains delayed executions.

sysinfosysinfo (Read Only):

Reference to the system information.

uiui (Read Only):

Reference to the ui options.