https://docs.derivative.ca/api.php?action=feedcontributions&user=Rob&feedformat=atomDerivative - User contributions [en-ca]2024-03-28T13:22:48ZUser contributionsMediaWiki 1.39.0https://docs.derivative.ca/index.php?title=UI_Class&diff=31060UI Class2024-03-12T19:56:20Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=UI|summary=The UI class describes access to the UI elements of the application, found in the automatically imported [[td Module|td module]].<br />
<br />
To access members and methods of this class use the default instance <code>ui</code>.<br />
<br />
For Example:<br />
<syntaxhighlight lang=python><br />
# open the Midi Device Mapper Dialog<br />
ui.openMIDIDeviceMapper()<br />
</syntaxhighlight>}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|class=UI<br />
|name=clipboard<br />
|type=str<br />
|set=1<br />
|text=Get or set the operating system clipboard text contents.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=colors<br />
|type=td.Colors<br />
|set=0<br />
|text=Access to the application [[Colors Class|colors]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=dpiBiCubicFilter<br />
|type=bool<br />
|set=1<br />
|text=Get or set the global DPI scale filtering mode of TouchDesigner windows. True means bi-cubic, False means linear.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=masterVolume<br />
|type=float<br />
|set=1<br />
|text=Get or set the master audio output volume. A value of 0 is no output, while a value of 1 is full output.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=options<br />
|type=td.Options<br />
|set=0<br />
|text=Access to the application [[Options Class|options]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=panes<br />
|type=td.Panes<br />
|set=0<br />
|text=Access to the set of all [[Panes Class|panes]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=performMode<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Perform Mode]]. Set to True to go into Perform Mode, False to go into [[Designer Mode]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=preferences<br />
|type=td.Preferences<br />
|set=0<br />
|text=Access to the application [[Preferences Class|preferences]], which can also be access through the [[Preferences Dialog]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=redrawMainWindow<br />
|type=bool<br />
|set=1<br />
|text=Get or set whether the main window should redraw. The main window is either the main network editor, or the perform window.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=rolloverOp<br />
|type=OP<br />
|set=0<br />
|text=Operator currently under the mouse in a network editor.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=rolloverPar<br />
|type=td.Par<br />
|set=0<br />
|text=Parameter currently under the mouse in a parameter dialog.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=rolloverPanel<br />
|type=panelCOMP<br />
|set=0<br />
|text=returns the latest panel to get a rollover event. Takes into account click through, depth order, and other panel settings.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=lastChopChannelSelected<br />
|type=td.Par<br />
|set=0<br />
|text=Last [[Channel|CHOP channel]] selected via mouse.}}<br />
{{ClassMember<br />
|class=UI<br />
|name=showPaletteBrowser<br />
|type=bool<br />
|set=1<br />
|text=Get or set display of the palette browser.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=status<br />
|type=str<br />
|set=1<br />
|text=Get or set the status message.<br />
<syntaxhighlight lang=python><br />
ui.status = 'Operation Complete'<br />
</syntaxhighlight> <br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=undo<br />
|type=td.Undo<br />
|set=0<br />
|text=Acess to application undo functions.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowWidth<br />
|type=int<br />
|set=0<br />
|text=Get the app window width.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowHeight<br />
|type=int<br />
|set=0<br />
|text=Get the app window height.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowX<br />
|type=int<br />
|set=0<br />
|text=Get the app window X position.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowY<br />
|type=int<br />
|set=0<br />
|text=Get the app window Y position.<br />
}}}}<br />
{{ClassMethodSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|class=UI<br />
|name=copyOPs<br />
|call=copyOPs(listOfOPs)<br />
|returns=None<br />
|text=Copy a list of operators to the operator clipboard. All operators must be children of the same component.<br />
*listOfOPs - A list containing one or more OPs to be copied.<br />
<syntaxhighlight lang=python>ui.copyOPs( op('geo1').selected )</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=pasteOPs<br />
|call=pasteOPs(COMP, x=None, y=None)<br />
|returns=None<br />
|text=Copy the contents of the operator clipboard into the specified component.<br />
*COMP - The destination to receive the operators.<br />
*x - Optional network coordinates at which to paste the operators.<br />
*y - see x<br />
<syntaxhighlight lang=python>l = ui.pasteOPs( op('geo2') )</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=messageBox<br />
|call=messageBox(title, message, buttons=['Ok'])<br />
|returns=int<br />
|text=This method will open a message dialog box with the specified message. Returns the index of the button clicked.<br />
*title - Specifies the window title.<br />
*message - Specifies the content of the dialog.<br />
*buttons - (Keyword, Optional) Specifies a list button labels to show in the dialog.<br />
<syntaxhighlight lang=python><br />
# basic usage<br />
ui.messageBox('Warning', 'Have a nice day.')<br />
# specify options and report result<br />
a = ui.messageBox('Please select:', 'Buttons:', buttons=['a', 'b', 'c'])<br />
ui.messageBox('Results', 'You selected item: ' + str(a))<br />
# pick a node from their paths<br />
ui.messageBox('Please select:', 'Nodes:', buttons=parent().children)<br />
# pick a node from their first names (list comprehension)<br />
ui.messageBox('Please select:', 'Nodes:', buttons=[x.name for x in parent().children])<br />
# pick a cell<br />
ui.messageBox('Please select:', 'Cells:', buttons=op('table1').cells('*','*'))<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=refresh<br />
|call=refresh()<br />
|returns=None<br />
|text=Update and redraw all viewports, nodes, UI elements etc immediately. This update is otherwise done once per frame at the end of all script executions. For example, if the current frame is manually changed during a script, a call to refresh will cause all dependent data to update immediately.<br />
<syntaxhighlight lang=python><br />
for i in range(100):<br />
ui.status = str(i)<br />
ui.refresh()<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=chooseFile<br />
|call=chooseFile(load=True, start=None, fileTypes=None, title=None, asExpression=False)<br />
|returns=str or None<br />
|text=Open a dialog box for loading or saving a file. Returns the filename selected or None if the dialog is cancelled.<br />
*load - (Keyword, Optional) If set to True, the dialog will be a Load dialog, otherwise it's a Save dialog.<br />
*start - (Keyword, Optional) If provided, specifies an initial folder location and/or filename selection.<br />
*fileTypes - (Keyword, Optional) If provided, specifies a list of file extensions that can be used as filters. Otherwise '*.*' is the only filter.<br />
*asExpression - (Keyword, Optional) If set to true, the results are provided as an expression, suitable for a [[Par Class|Parameter]] expression or as input to an eval() call. [[App Class]] member constants such as samplesFolder may be included in the result.<br />
*title (Keyword, Optional) If provided, will override the default window title.<br />
<syntaxhighlight lang=python><br />
a = ui.chooseFile(start='python_examples.toe', fileTypes=['toe'], title='Select a toe') # specify extension<br />
a = ui.chooseFile(fileTypes=tdu.fileTypes['image'], title='Select an image') # any support image extension<br />
path = ui.chooseFile(load=False,fileTypes=['txt'],title='Save table as:')<br />
if (path):<br />
op('table1').save(path)<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=chooseFolder<br />
|call=chooseFolder(title=<nowiki>'Select Folder'</nowiki>, start=None, asExpression=False)<br />
|returns=str or None<br />
|text=Open a dialog box for selecting a folder. Returns the folder selected or None if the dialog is cancelled.<br />
*title - (Keyword, Optional) If provided, specifies the window title.<br />
*start - (Keyword, Optional) If provided, specifies an initial folder location and/or filename selection.<br />
*asExpression - (Keyword, Optional) If set to true, the results are provided as an expression, suitable for a [[Par Class|Parameter]] expression or as input to an eval() call. [[App Class]] member constants such as samplesFolder may be included in the result.<br />
<syntaxhighlight lang=python><br />
a = ui.chooseFolder()<br />
a = ui.chooseFolder(title='Select a folder location.')<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=viewFile<br />
|call=viewFile(URL_or_path, showInFolder=False)<br />
|returns=None<br />
|text=View a URL or file in the default external application. You can use <code>ui.viewFile()</code> to open a folder/directory in Windows Explorer or macOS Finder.<br />
*URL_or_path - URL or path to launch.<br />
<syntaxhighlight lang=python><br />
a = ui.viewFile('output.txt')<br />
</syntaxhighlight><br />
*showInFolder - Show file as selected in Explorer or macOS Finder instead of launching an external application.<br />
<syntaxhighlight lang=python><br />
a = ui.viewFile('output.txt', showInFolder=True)<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openBeat<br />
|call=openBeat()<br />
|returns=None<br />
|text=Open the [[Beat Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openBookmarks<br />
|call=openBookmarks()<br />
|returns=None<br />
|text=Open the [[Bookmarks Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openCOMPEditor<br />
|call=openCOMPEditor(path)<br />
|returns=None<br />
|text=Open component editor for the specific operator.<br />
*path - Specifies the path to the operator. An OP can be passed in as well.<br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openConsole<br />
|call=openConsole()<br />
|returns=None<br />
|text=Open the [[Console Window]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openDialogHelp<br />
|call=openDialogHelp(title)<br />
|returns=None<br />
|text=Open help page for the specific dialog.<br />
*title - Specifies the help page to open.<br />
<syntaxhighlight lang=python><br />
ui.openDialogHelp('Window Placement Dialog')<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openErrors<br />
|call=openErrors()<br />
|returns=None<br />
|text=Open the [[Errors Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openExplorer<br />
|call=openExplorer()<br />
|returns=None<br />
|text=Open an Explorer window.<br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openExportMovie<br />
|call=openExportMovie(path)<br />
|returns=None<br />
|text=Open the [[Export Movie Dialog]].<br />
*path - Specifies the operator content to export, optional.<br />
<syntaxhighlight lang=python><br />
ui.openExportMovie('/project1/out1')<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openImportFile<br />
|call=openImportFile()<br />
|returns=None<br />
|text=Open the [[Import File Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openKeyManager<br />
|call=openKeyManager()<br />
|returns=None<br />
|text=Open the [[Key Manager Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openMIDIDeviceMapper<br />
|call=openMIDIDeviceMapper()<br />
|returns=None<br />
|text=Open the [[MIDI Device Mapper Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openNewProject<br />
|call=openNewProject()<br />
|returns=None<br />
|text=Open the [[New Project Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openOperatorSnippets<br />
|call=openOperatorSnippets(family=None, type=None, example=None)<br />
|returns=None<br />
|text=Open the Operator Snippets window.}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openPaletteBrowser<br />
|call=openPaletteBrowser()<br />
|returns=None<br />
|text=Open the [[Palette]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openPerformanceMonitor<br />
|call=openPerformanceMonitor()<br />
|returns=None<br />
|text=Open the [[Performance Monitor Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openPreferences<br />
|call=openPreferences()<br />
|returns=None<br />
|text=Open the [[Preferences Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openSearch<br />
|call=openSearch()<br />
|returns=None<br />
|text=Open the [[Search Replace Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openTextport<br />
|call=openTextport()<br />
|returns=None<br />
|text=Open the [[Textport]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openVersion<br />
|call=openVersion()<br />
|returns=None<br />
|text=Open a dialog displaying current version information.<br />
See also: [[App Class|App.version]]}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openWindowPlacement<br />
|call=openWindowPlacement()<br />
|returns=None<br />
|text=Open the [[Window Placement Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=findEditDAT<br />
|call=findEditDAT(filename)<br />
|returns=DAT or None<br />
|text=Given an external filename, finds the corresponding DAT thats update from this filename if any..}}}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=UI_Class&diff=30984UI Class2024-02-28T19:47:23Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=UI|summary=The UI class describes access to the UI elements of the application, found in the automatically imported [[td Module|td module]].<br />
<br />
To access members and methods of this class use the default instance <code>ui</code>.<br />
<br />
For Example:<br />
<syntaxhighlight lang=python><br />
# open the Midi Device Mapper Dialog<br />
ui.openMIDIDeviceMapper()<br />
</syntaxhighlight>}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|class=UI<br />
|name=clipboard<br />
|type=str<br />
|set=1<br />
|text=Get or set the operating system clipboard text contents.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=colors<br />
|type=td.Colors<br />
|set=0<br />
|text=Access to the application [[Colors Class|colors]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=dpiBiCubicFilter<br />
|type=bool<br />
|set=1<br />
|text=Get or set the global DPI scale filtering mode of TouchDesigner windows. True means bi-cubic, False means linear.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=masterVolume<br />
|type=float<br />
|set=1<br />
|text=Get or set the master audio output volume. A value of 0 is no output, while a value of 1 is full output.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=options<br />
|type=td.Options<br />
|set=0<br />
|text=Access to the application [[Options Class|options]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=panes<br />
|type=td.Panes<br />
|set=0<br />
|text=Access to the set of all [[Panes Class|panes]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=performMode<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Perform Mode]]. Set to True to go into Perform Mode, False to go into [[Designer Mode]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=preferences<br />
|type=td.Preferences<br />
|set=0<br />
|text=Access to the application [[Preferences Class|preferences]], which can also be access through the [[Preferences Dialog]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=redrawMainWindow<br />
|type=bool<br />
|set=1<br />
|text=Get or set whether the main window should redraw. The main window is either the main network editor, or the perform window.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=rolloverOp<br />
|type=OP<br />
|set=0<br />
|text=Operator currently under the mouse in a network editor.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=rolloverPar<br />
|type=td.Par<br />
|set=0<br />
|text=Parameter currently under the mouse in a parameter dialog.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=rolloverPanel<br />
|type=panelCOMP<br />
|set=0<br />
|text=returns the latest panel to get a rollover event. Takes into account click through, depth order, and other panel settings.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=lastChopChannelSelected<br />
|type=td.Par<br />
|set=0<br />
|text=Last [[Channel|CHOP channel]] selected via mouse.}}<br />
{{ClassMember<br />
|class=UI<br />
|name=showPaletteBrowser<br />
|type=bool<br />
|set=1<br />
|text=Get or set display of the palette browser.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=status<br />
|type=str<br />
|set=1<br />
|text=Get or set the status message.<br />
<syntaxhighlight lang=python><br />
ui.status = 'Operation Complete'<br />
</syntaxhighlight> <br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=undo<br />
|type=td.Undo<br />
|set=0<br />
|text=Acess to application undo functions.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowWidth<br />
|type=int<br />
|set=0<br />
|text=Get the app window width.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowHeight<br />
|type=int<br />
|set=0<br />
|text=Get the app window height.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowX<br />
|type=int<br />
|set=0<br />
|text=Get the app window X position.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowY<br />
|type=int<br />
|set=0<br />
|text=Get the app window Y position.<br />
}}}}<br />
{{ClassMethodSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|class=UI<br />
|name=copyOPs<br />
|call=copyOPs(listOfOPs)<br />
|returns=None<br />
|text=Copy a list of operators to the operator clipboard. All operators must be children of the same component.<br />
*listOfOPs - A list containing one or more OPs to be copied.<br />
<syntaxhighlight lang=python>ui.copyOPs( op('geo1').selected )</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=pasteOPs<br />
|call=pasteOPs(COMP, x=None, y=None)<br />
|returns=None<br />
|text=Copy the contents of the operator clipboard into the specified component.<br />
*COMP - The destination to receive the operators.<br />
*x - Optional network coordinates at which to paste the operators.<br />
*y - see x<br />
<syntaxhighlight lang=python>l = ui.pasteOPs( op('geo2') )</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=messageBox<br />
|call=messageBox(title, message, buttons=['Ok'])<br />
|returns=int<br />
|text=This method will open a message dialog box with the specified message. Returns the index of the button clicked.<br />
*title - Specifies the window title.<br />
*message - Specifies the content of the dialog.<br />
*buttons - (Keyword, Optional) Specifies a list button labels to show in the dialog.<br />
<syntaxhighlight lang=python><br />
# basic usage<br />
ui.messageBox('Warning', 'Have a nice day.')<br />
# specify options and report result<br />
a = ui.messageBox('Please select:', 'Buttons:', buttons=['a', 'b', 'c'])<br />
ui.messageBox('Results', 'You selected item: ' + str(a))<br />
# pick a node from their paths<br />
ui.messageBox('Please select:', 'Nodes:', buttons=parent().children)<br />
# pick a node from their first names (list comprehension)<br />
ui.messageBox('Please select:', 'Nodes:', buttons=[x.name for x in parent().children])<br />
# pick a cell<br />
ui.messageBox('Please select:', 'Cells:', buttons=op('table1').cells('*','*'))<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=refresh<br />
|call=refresh()<br />
|returns=None<br />
|text=Update and redraw all viewports, nodes, UI elements etc immediately. This update is otherwise done once per frame at the end of all script executions. For example, if the current frame is manually changed during a script, a call to refresh will cause all dependent data to update immediately.<br />
<syntaxhighlight lang=python><br />
for i in range(100):<br />
ui.status = str(i)<br />
ui.refresh()<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=chooseFile<br />
|call=chooseFile(load=True, start=None, fileTypes=None, title=None, asExpression=False)<br />
|returns=str or None<br />
|text=Open a dialog box for loading or saving a file. Returns the filename selected or None if the dialog is cancelled.<br />
*load - (Keyword, Optional) If set to True, the dialog will be a Load dialog, otherwise it's a Save dialog.<br />
*start - (Keyword, Optional) If provided, specifies an initial folder location and/or filename selection.<br />
*fileTypes - (Keyword, Optional) If provided, specifies a list of file extensions that can be used as filters. Otherwise '*.*' is the only filter.<br />
*asExpression - (Keyword, Optional) If set to true, the results are provided as an expression, suitable for a [[Par Class|Parameter]] expression or as input to an eval() call. [[App Class]] member constants such as samplesFolder may be included in the result.<br />
*title (Keyword, Optional) If provided, will override the default window title.<br />
<syntaxhighlight lang=python><br />
a = ui.chooseFile(start='python_examples.toe', fileTypes=['toe'], title='Select a toe') # specify extension<br />
a = ui.chooseFile(fileTypes=tdu.fileTypes['image'], title='Select an image') # any support image extension<br />
path = ui.chooseFile(load=False,fileTypes=['txt'],title='Save table as:')<br />
if (path):<br />
op('table1').save(path)<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=chooseFolder<br />
|call=chooseFolder(title=<nowiki>'Select Folder'</nowiki>, start=None, asExpression=False)<br />
|returns=str or None<br />
|text=Open a dialog box for selecting a folder. Returns the folder selected or None if the dialog is cancelled.<br />
*title - (Keyword, Optional) If provided, specifies the window title.<br />
*start - (Keyword, Optional) If provided, specifies an initial folder location and/or filename selection.<br />
*asExpression - (Keyword, Optional) If set to true, the results are provided as an expression, suitable for a [[Par Class|Parameter]] expression or as input to an eval() call. [[App Class]] member constants such as samplesFolder may be included in the result.<br />
<syntaxhighlight lang=python><br />
a = ui.chooseFolder()<br />
a = ui.chooseFolder(title='Select a folder location.')<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=viewFile<br />
|call=viewFile(URL_or_path, showInFolder=False)<br />
|returns=None<br />
|text=View a URL or file in the default external application. You can use <code>ui.viewFile()</code> to open a folder/directory in Windows Explorer or macOS Finder.<br />
*URL_or_path - URL or path to launch.<br />
<syntaxhighlight lang=python><br />
a = ui.viewFile('output.txt')<br />
</syntaxhighlight><br />
*showInFolder - Show file as selected in Explorer or macOS Finder instead of launching an external application.<br />
<syntaxhighlight lang=python><br />
a = ui.viewFile('output.txt', showInFolder=True)<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openAbletonControl<br />
|call=openAbletonControl()<br />
|returns=None<br />
|text=Deprecated. Use [[TDAbleton]] instead.}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openBeat<br />
|call=openBeat()<br />
|returns=None<br />
|text=Open the [[Beat Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openBookmarks<br />
|call=openBookmarks()<br />
|returns=None<br />
|text=Open the [[Bookmarks Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openCOMPEditor<br />
|call=openCOMPEditor(path)<br />
|returns=None<br />
|text=Open component editor for the specific operator.<br />
*path - Specifies the path to the operator. An OP can be passed in as well.<br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openConsole<br />
|call=openConsole()<br />
|returns=None<br />
|text=Open the [[Console Window]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openDialogHelp<br />
|call=openDialogHelp(title)<br />
|returns=None<br />
|text=Open help page for the specific dialog.<br />
*title - Specifies the help page to open.<br />
<syntaxhighlight lang=python><br />
ui.openDialogHelp('Window Placement Dialog')<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openErrors<br />
|call=openErrors()<br />
|returns=None<br />
|text=Open the [[Errors Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openExplorer<br />
|call=openExplorer()<br />
|returns=None<br />
|text=Open an Explorer window.<br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openExportMovie<br />
|call=openExportMovie(path)<br />
|returns=None<br />
|text=Open the [[Export Movie Dialog]].<br />
*path - Specifies the operator content to export, optional.<br />
<syntaxhighlight lang=python><br />
ui.openExportMovie('/project1/out1')<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openHelp<br />
|call=openHelp()<br />
|returns=None<br />
|text=Open the [[Commands_and_Expressions|Help Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openImportFile<br />
|call=openImportFile()<br />
|returns=None<br />
|text=Open the [[Import File Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openKeyManager<br />
|call=openKeyManager()<br />
|returns=None<br />
|text=Open the [[Key Manager Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openMIDIDeviceMapper<br />
|call=openMIDIDeviceMapper()<br />
|returns=None<br />
|text=Open the [[MIDI Device Mapper Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openNewProject<br />
|call=openNewProject()<br />
|returns=None<br />
|text=Open the [[New Project Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openOperatorSnippets<br />
|call=openOperatorSnippets(family=None, type=None, example=None)<br />
|returns=None<br />
|text=Open the Operator Snippets window.}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openPaletteBrowser<br />
|call=openPaletteBrowser()<br />
|returns=None<br />
|text=Open the [[Palette]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openPerformanceMonitor<br />
|call=openPerformanceMonitor()<br />
|returns=None<br />
|text=Open the [[Performance Monitor Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openPreferences<br />
|call=openPreferences()<br />
|returns=None<br />
|text=Open the [[Preferences Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openSearch<br />
|call=openSearch()<br />
|returns=None<br />
|text=Open the [[Search Replace Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openTextport<br />
|call=openTextport()<br />
|returns=None<br />
|text=Open the [[Textport]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openVersion<br />
|call=openVersion()<br />
|returns=None<br />
|text=Open a dialog displaying current version information.<br />
See also: [[App Class|App.version]]}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openWindowPlacement<br />
|call=openWindowPlacement()<br />
|returns=None<br />
|text=Open the [[Window Placement Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=findEditDAT<br />
|call=findEditDAT(filename)<br />
|returns=DAT or None<br />
|text=Given an external filename, finds the corresponding DAT thats update from this filename if any..}}}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=UI_Class&diff=30983UI Class2024-02-28T19:42:58Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=UI|summary=The UI class describes access to the UI elements of the application, found in the automatically imported [[td Module|td module]].<br />
<br />
To access members and methods of this class use the default instance <code>ui</code>.<br />
<br />
For Example:<br />
<syntaxhighlight lang=python><br />
# open the Midi Device Mapper Dialog<br />
ui.openMIDIDeviceMapper()<br />
</syntaxhighlight>}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|class=UI<br />
|name=clipboard<br />
|type=str<br />
|set=1<br />
|text=Get or set the operating system clipboard text contents.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=colors<br />
|type=td.Colors<br />
|set=0<br />
|text=Access to the application [[Colors Class|colors]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=dpiBiCubicFilter<br />
|type=bool<br />
|set=1<br />
|text=Get or set the global DPI scale filtering mode of TouchDesigner windows. True means bi-cubic, False means linear.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=masterVolume<br />
|type=float<br />
|set=1<br />
|text=Get or set the master audio output volume. A value of 0 is no output, while a value of 1 is full output.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=options<br />
|type=td.Options<br />
|set=0<br />
|text=Access to the application [[Options Class|options]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=panes<br />
|type=td.Panes<br />
|set=0<br />
|text=Access to the set of all [[Panes Class|panes]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=performMode<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Perform Mode]]. Set to True to go into Perform Mode, False to go into [[Designer Mode]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=preferences<br />
|type=td.Preferences<br />
|set=0<br />
|text=Access to the application [[Preferences Class|preferences]], which can also be access through the [[Preferences Dialog]].}}<br />
{{ClassMember<br />
|class=UI<br />
|name=redrawMainWindow<br />
|type=bool<br />
|set=1<br />
|text=Get or set whether the main window should redraw. The main window is either the main network editor, or the perform window.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=rolloverOp<br />
|type=OP<br />
|set=0<br />
|text=Operator currently under the mouse in a network editor.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=rolloverPar<br />
|type=td.Par<br />
|set=0<br />
|text=Parameter currently under the mouse in a parameter dialog.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=rolloverPanel<br />
|type=panelCOMP<br />
|set=0<br />
|text=returns the latest panel to get a rollover event. Takes into account click through, depth order, and other panel settings.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=lastChopChannelSelected<br />
|type=td.Par<br />
|set=0<br />
|text=Last [[Channel|CHOP channel]] selected via mouse.}}<br />
{{ClassMember<br />
|class=UI<br />
|name=showPaletteBrowser<br />
|type=bool<br />
|set=1<br />
|text=Get or set display of the palette browser.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=status<br />
|type=str<br />
|set=1<br />
|text=Get or set the status message.<br />
<syntaxhighlight lang=python><br />
ui.status = 'Operation Complete'<br />
</syntaxhighlight> <br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=undo<br />
|type=td.Undo<br />
|set=0<br />
|text=Acess to application undo functions.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowWidth<br />
|type=int<br />
|set=0<br />
|text=Get the app window width.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowHeight<br />
|type=int<br />
|set=0<br />
|text=Get the app window height.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowX<br />
|type=int<br />
|set=0<br />
|text=Get the app window X position.<br />
}}<br />
{{ClassMember<br />
|class=UI<br />
|name=windowY<br />
|type=int<br />
|set=0<br />
|text=Get the app window Y position.<br />
}}}}<br />
{{ClassMethodSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|class=UI<br />
|name=copyOPs<br />
|call=copyOPs(listOfOPs)<br />
|returns=None<br />
|text=Copy a list of operators to the operator clipboard. All operators must be children of the same component.<br />
*listOfOPs - A list containing one or more OPs to be copied.<br />
<syntaxhighlight lang=python>ui.copyOPs( op('geo1').selected )</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=pasteOPs<br />
|call=pasteOPs(COMP, x=None, y=None)<br />
|returns=None<br />
|text=Copy the contents of the operator clipboard into the specified component.<br />
*COMP - The destination to receive the operators.<br />
*x - Optional network coordinates at which to paste the operators.<br />
*y - see x<br />
<syntaxhighlight lang=python>l = ui.pasteOPs( op('geo2') )</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=messageBox<br />
|call=messageBox(title, message, buttons=['Ok'])<br />
|returns=int<br />
|text=This method will open a message dialog box with the specified message. Returns the index of the button clicked.<br />
*title - Specifies the window title.<br />
*message - Specifies the content of the dialog.<br />
*buttons - (Keyword, Optional) Specifies a list button labels to show in the dialog.<br />
<syntaxhighlight lang=python><br />
# basic usage<br />
ui.messageBox('Warning', 'Have a nice day.')<br />
# specify options and report result<br />
a = ui.messageBox('Please select:', 'Buttons:', buttons=['a', 'b', 'c'])<br />
ui.messageBox('Results', 'You selected item: ' + str(a))<br />
# pick a node from their paths<br />
ui.messageBox('Please select:', 'Nodes:', buttons=parent().children)<br />
# pick a node from their first names (list comprehension)<br />
ui.messageBox('Please select:', 'Nodes:', buttons=[x.name for x in parent().children])<br />
# pick a cell<br />
ui.messageBox('Please select:', 'Cells:', buttons=op('table1').cells('*','*'))<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=refresh<br />
|call=refresh()<br />
|returns=None<br />
|text=Update and redraw all viewports, nodes, UI elements etc immediately. This update is otherwise done once per frame at the end of all script executions. For example, if the current frame is manually changed during a script, a call to refresh will cause all dependent data to update immediately.<br />
<syntaxhighlight lang=python><br />
for i in range(100):<br />
ui.status = str(i)<br />
ui.refresh()<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=chooseFile<br />
|call=chooseFile(load=True, start=None, fileTypes=None, title=None, asExpression=False)<br />
|returns=str or None<br />
|text=Open a dialog box for loading or saving a file. Returns the filename selected or None if the dialog is cancelled.<br />
*load - (Keyword, Optional) If set to True, the dialog will be a Load dialog, otherwise it's a Save dialog.<br />
*start - (Keyword, Optional) If provided, specifies an initial folder location and/or filename selection.<br />
*fileTypes - (Keyword, Optional) If provided, specifies a list of file extensions that can be used as filters. Otherwise '*.*' is the only filter.<br />
*asExpression - (Keyword, Optional) If set to true, the results are provided as an expression, suitable for a [[Par Class|Parameter]] expression or as input to an eval() call. [[App Class]] member constants such as samplesFolder may be included in the result.<br />
*title (Keyword, Optional) If provided, will override the default window title.<br />
<syntaxhighlight lang=python><br />
a = ui.chooseFile(start='python_examples.toe', fileTypes=['toe'], title='Select a toe') # specify extension<br />
a = ui.chooseFile(fileTypes=tdu.fileTypes['image'], title='Select an image') # any support image extension<br />
path = ui.chooseFile(load=False,fileTypes=['txt'],title='Save table as:')<br />
if (path):<br />
op('table1').save(path)<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=chooseFolder<br />
|call=chooseFolder(title=<nowiki>'Select Folder'</nowiki>, start=None, asExpression=False)<br />
|returns=str or None<br />
|text=Open a dialog box for selecting a folder. Returns the folder selected or None if the dialog is cancelled.<br />
*title - (Keyword, Optional) If provided, specifies the window title.<br />
*start - (Keyword, Optional) If provided, specifies an initial folder location and/or filename selection.<br />
*asExpression - (Keyword, Optional) If set to true, the results are provided as an expression, suitable for a [[Par Class|Parameter]] expression or as input to an eval() call. [[App Class]] member constants such as samplesFolder may be included in the result.<br />
<syntaxhighlight lang=python><br />
a = ui.chooseFolder()<br />
a = ui.chooseFolder(title='Select a folder location.')<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=viewFile<br />
|call=viewFile(URL_or_path, showInFolder=False)<br />
|returns=None<br />
|text=View a URL or file in the default external application. You can use <code>ui.viewFile()</code> to open a folder/directory in Windows Explorer or macOS Finder.<br />
*URL_or_path - URL or path to launch.<br />
<syntaxhighlight lang=python><br />
a = ui.viewFile('output.txt')<br />
</syntaxhighlight><br />
*showInFolder - Show file as selected in Explorer or macOS Finder instead of launching an external application.<br />
<syntaxhighlight lang=python><br />
a = ui.viewFile('output.txt', showInFolder=True)<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openAbletonControl<br />
|call=openAbletonControl()<br />
|returns=None<br />
|text=Deprecated. Use [[TDAbleton]] instead.}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openBeat<br />
|call=openBeat()<br />
|returns=None<br />
|text=Open the [[Beat Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openBookmarks<br />
|call=openBookmarks()<br />
|returns=None<br />
|text=Open the [[Bookmarks Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openCOMPEditor<br />
|call=openCOMPEditor(path)<br />
|returns=None<br />
|text=Open component editor for the specific operator.<br />
*path - Specifies the path to the operator. An OP can be passed in as well.<br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openConsole<br />
|call=openConsole()<br />
|returns=None<br />
|text=Open the [[Console Window]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openDialogHelp<br />
|call=openDialogHelp(title)<br />
|returns=None<br />
|text=Open help page for the specific dialog.<br />
*title - Specifies the help page to open.<br />
<syntaxhighlight lang=python><br />
ui.openDialogHelp('Window Placement Dialog')<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openErrors<br />
|call=openErrors()<br />
|returns=None<br />
|text=Open the [[Errors Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openExplorer<br />
|call=openExplorer()<br />
|returns=None<br />
|text=Open an Explorer window.<br />
}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openExportMovie<br />
|call=openExportMovie(path)<br />
|returns=None<br />
|text=Open the [[Export Movie Dialog]].<br />
*path - Specifies the operator content to export, optional.}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openHelp<br />
|call=openHelp()<br />
|returns=None<br />
|text=Open the [[Commands_and_Expressions|Help Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openImportFile<br />
|call=openImportFile()<br />
|returns=None<br />
|text=Open the [[Import File Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openKeyManager<br />
|call=openKeyManager()<br />
|returns=None<br />
|text=Open the [[Key Manager Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openMIDIDeviceMapper<br />
|call=openMIDIDeviceMapper()<br />
|returns=None<br />
|text=Open the [[MIDI Device Mapper Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openNewProject<br />
|call=openNewProject()<br />
|returns=None<br />
|text=Open the [[New Project Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openOperatorSnippets<br />
|call=openOperatorSnippets(family=None, type=None, example=None)<br />
|returns=None<br />
|text=Open the Operator Snippets window.}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openPaletteBrowser<br />
|call=openPaletteBrowser()<br />
|returns=None<br />
|text=Open the [[Palette]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openPerformanceMonitor<br />
|call=openPerformanceMonitor()<br />
|returns=None<br />
|text=Open the [[Performance Monitor Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openPreferences<br />
|call=openPreferences()<br />
|returns=None<br />
|text=Open the [[Preferences Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openSearch<br />
|call=openSearch()<br />
|returns=None<br />
|text=Open the [[Search Replace Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openTextport<br />
|call=openTextport()<br />
|returns=None<br />
|text=Open the [[Textport]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openVersion<br />
|call=openVersion()<br />
|returns=None<br />
|text=Open a dialog displaying current version information.<br />
See also: [[App Class|App.version]]}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=openWindowPlacement<br />
|call=openWindowPlacement()<br />
|returns=None<br />
|text=Open the [[Window Placement Dialog]].}}<br />
{{ClassMethod<br />
|class=UI<br />
|name=findEditDAT<br />
|call=findEditDAT(filename)<br />
|returns=DAT or None<br />
|text=Given an external filename, finds the corresponding DAT thats update from this filename if any..}}}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=Release_Notes/2023.10000&diff=30911Release Notes/2023.100002024-02-08T14:41:35Z<p>Rob: </p>
<hr />
<div><big>Current Build '''2023.11510 - Feb 07 2023''' - [https://derivative.ca/download/archive Download Here]</big><br />
<br />
See our '''[https://derivative.ca/community-post/2023-official-update/68688 Official Announcement]''' for an overview of new features.<br />
<br />
There are currently no new experimental builds. For the previous experimental builds leading to this Official release go to [[Release_Notes/Experimental|Experimental Release Notes]].<br />
<!--For Experimental builds, go to [[Release_Notes/Experimental|Experimental Release Notes]].--><br />
<br />
== Official Build - 2023.10000 Series ==<br />
<br />
'''Known Issues''' and '''Backward Compatibility''' warnings below should be read carefully.<br />
<br />
==File Compatibility==<br />
<br />
⚠️ '''Project <code>.toe</code> files saved in 2023 Official builds can not be loaded back into previous versions of TouchDesigner such as 2022 or 2021 builds'''.<br />
<br />
==Known Issues==<br />
<br />
Please report all issues to the '''[https://forum.derivative.ca/ Bugs Forum]''', remember to include build number.<br />
* [[Body Track CHOP]] - Can sometimes crash if parameters are manipulated too quickly.<br />
<br />
<br />
== Build 2023.11510 - Feb 07, 2024 ==<br />
<br />
=== New Features ===<br />
<br />
* [[Bloom TOP]] - '''Reworked algorithm for better bloom characteristics with less artifacts, added new parameters for better control.''' Note: Previous bloom settings may have to be adjusted to get a similar effect.<br />
** Reorganized parameters into sections for preprocess, bloom radius, bloom controls, and output.<br />
** Bloom Gamma replaced by 'Bloom Threshold', 'Bloom S-Curve', and 'Bloom Fill' parameters, giving more control over bloom spread and falloff.<br />
** Bloom Alpha toggle parameter removed.<br />
* [[Parameter DAT]] - '''Added Sequential Parameter attributes''': sequence, blockindex, basename, numblocks<br />
<br />
* [[Constant MAT]] - Added '''new 'Apply Point Color' parameter''' which uses the color point attribute to apply color to the geometry.<br />
<br />
* [[GLSL MAT]] - Added support for '''Specialization Constants'''.<br />
* Added new menu to Object Components to give '''better control of parent transforms'''.<br />
<br />
* [[DAT]]s - Added YAML syntax highlighting for DATs, see Common page parameters.<br />
<br />
<br />
=== New Python ===<br />
<br />
* [[App Class]]<code>.applicationsFolder</code> - A new python function to '''return the standard install location''' on the system, for example <code>C:/Program Files</code> on Windows.<br />
* [[Attributes Class]] - Fixed erroneous '''cook dependency loop on creating pointAttribs'''. Now doesn't recook the geo if the OP is already being cooked.<br />
* [[DAT Class]] - <code>cell()</code>, <code>findCell()</code>, <code>cells()</code>, <code>findCells()</code> have a '''new bool argument `<code>val</code>`'''. `<code>val=True</code>` returns list of just cell entries instead of list of cells.<br />
* [[OP Class]] - .pages <code>.customPages</code> now support '''indexing by name'''.<br />
* [[OP Class]]<code>.curSeq</code> - Returns the sequence of the currently evaluated parameter.<br />
* [[OP Class]]<code>.unload()</code> - Added '''new method to all OPs to unload their memory without having to disable their cooking via a parent COMP'''.<br />
* [[OP Class]] - <code>parGroups(pattern)</code> -> list - Returns a (possibly empty) list of Parameter Group objects that match the pattern.<br />
<br />
For example:<br><br />
n.parGroups() #all<br />
n.parGroups('Color*') #all begininng with Color<br />
<br />
For singles it is still quicker to use: <code>n.parGroup.Color</code> or <code>n.parGroup['Color']</code><br />
<br />
* [[Par Class]]<code>.evalFile()</code> - A new method to '''evaluate a parameter as a file path and return a tdu.FileInfo object'''. Uses the node's relative path behavior to expand the string to an absolute file path if applicable.<br />
<br />
* [[Sequence Class]] - '''<code>Blockid</code> parameters'''. If any block parameters have a base name of '<code>blockid</code>' they will automatically be maintained with unique constant values - no other block in the sequence will be given the same value for <code>blockid</code>. When blocks are added, deleted, moved or copied, the <code>blockid</code> parameter value will remain unchanged. See [[Sequential Parameters#Referring_to_Another_Block]]. This allows accessing any block to be consistent, regardless of its final order. To access a block by this unique id use the <code>Sequence.id()</code> function. The <code>.id(''val'')</code> function will return the block whose <code>blockid</code> parameter matches the given value. For example:<br><br />
<code>v = n.seq.Segments.id(3).par.start</code><br />
<br />
* [[UI_Class]]<code>.masterVolume</code> - To control the volume of TouchDesigner outputs is now working on macOS.<br />
<br />
<br />
=== New Palette ===<br />
<br />
* [[Palette:camSchnappr]] - Adjustments for '''new touchOSC control interface as well as a 'Live Updates' toggle''' to keep Auto Blend mask updating at all times.<br />
** touchOSC file contained as a [[Virtual File System|vfs]] file can be saved out via OSC parameter page.<br />
** Fixed 'Autoblend' references not clearing when deleting them on <code>camSchnappr</code> parameters. <br />
** '''Modifier key to select and delete points on macOS changed to Cmd key.'''<br />
* [[Palette:gestureCapture]] - v8.0.5 - Cosmetic improvements to defaults, outputs more data.<br />
* [[Palette:lister]] - Fixed an issue where font face won't be found in certain situations.<br />
* [[Palette:logger]] - v2.2.7 - '''Swapping Debug and Info log levels''' in level par menu so that it makes more sense.<br />
* [[Palette:opBrowser]] - Make "Filter Roots Only" work to show children.<br />
<br />
* [[Palette:particlesGpu]] - Source generator's sphere radius was improperly calculated.<br />
<br />
* [[Palette:pointGenerator]] - Sphere radius was improperly calculated.<br />
* [[Palette:quadReproject]] - v0.3.0 - Refactor for <code>quadReproject</code> COMP to internally rely on the newly introduced custom par sequences.<br />
* [[Palette:sceneChanger]] - v 1.0.8 - Added select to [[Resolution TOP]] to save memory.<br />
* [[Palette:sickEngine]] - Fixed file path to sickCore component.<br />
<br />
* [[TDSynchro]] - v0.1.4 - Fixed '''expression reference error''' in the <code>synchroCache</code> component.<br />
<br />
* [[Widgets]] - v2.1.104<br />
** Fixed display issues with folder tab widget.<br />
** Removed erroneous parameters from field and reference widgets.<br />
<br />
<br />
=== Bug Fixes and Improvements ===<br />
<br />
* [[RealSense CHOP]] - '''DEPRECATED''': Skeleton tracking features no longer licensable by Cubemos.<br />
* Upgrade to depthAI 2.24.0 - [[OAK-D]]<br />
* Upgrade to ShowNET API v1.3 - [[Laser Device CHOP]]<br />
<br />
'''COMP'''<br />
* [[Engine COMP]] & [[TouchEngine]] - Fixed '''missing custom menu''' parameters.<br />
** Fixed bad output when input textures are applied as color maps on MATs.<br />
* [[FBX COMP]] - Fixed material deform crash.<br />
* [[Nvidia Flex Solver COMP]] - Fixed '''crash from pulsing init/start''' in quick succession.<br />
<br />
* [[Parameter COMP]] - When ''''Allow Expansion' disabled, also disable drag/drop + menu choices'''.<br />
* [[Select COMP]] - Fixed an issue of '''not passing clickthrough events'''.<br />
* [[Text COMP]] - Fixed an editing bug where keyboard events were incorrectly passed along to the main TouchDesigner UI.<br />
* [[USD COMP]] - Fixed PBR material crash.<br />
<br />
'''TOP'''<br />
* [[Bloom TOP]] - Fixed for crash when '''resolution is less than 8 pixels'''.<br />
* [[CHOP to TOP]] - Fixed an issue '''filling default values''' into RGBA textures.<br />
* [[Depth TOP]] - '''Fixed 'Depth Peel Layer'''' not getting the correct depth buffer.<br />
* [[Kinect Azure TOP]] / [[Orbbec TOP]] - Added check that only one Orbbec node type can be activated in a single project.<br />
* [[Leap Motion TOP]] / [[Leap Motion CHOP]] - '''Changed the default library folder''' to match the default SDK installation folder.<br />
* [[Movie File In TOP]] - Fixed '''input timecode so that it's rate-adjusted''' to the movie file rate.<br />
* [[Movie File In TOP]] - Fixed <code>file_resx</code> and <code>file_resy</code> info channels not updating when 'Upload Image' was turned off.<br />
<br />
* [[NDI In TOP]] - Fixed '''broken images at some resolutions''' on macOS.<br />
* [[Noise TOP]] - 'Derivative' toggle parameter will get disabled if the selected noise type doesn't support derivatives. For 2D derivatives, the z derivative value will now be 0 instead of 1.<br />
* [[Notch TOP]] - Fixed crash when using a Notch block that contained a Kinect Azure operator.<br />
* [[Orbbec TOP]] - '''Enabled Orbbec TOP on Mac OS''' (Apple Silicon only).<br />
* [[Point File In TOP]] - Fixed a bug where '''EXR images are loaded in upside down'''. Furthermore, the original dimensions of EXR images are preserved again like in previous releases.<br />
* [[Render Select TOP]] - Fixed crash that can occur when deleting this node in some cases.<br />
* [[Spectrum TOP]] - High resolution crash fixed.<br />
* [[Time Machine TOP]] - Now works better with Texture Reference operators such as the [[Select TOP]] and [[Null TOP]].<br />
* [[Video Device In TOP]] - Fixed '''tearing issues on [[AJA]]''' devices using 'Sync To Input Frame'.<br />
<br />
'''CHOP'''<br />
<br />
* [[Lag CHOP]] - '''Reset pulse now works in 'Lag per Sample'''' mode.<br />
<br />
* [[LTC Out CHOP]] - Rename parameter "High FPS Behaviour" to "High FPS Behavior".<br />
<br />
* [[Object CHOP]] - Assume a '''default pivot of (0,0,0)''' not (1,1,1) when specifying by CHOP channels.<br />
* [[OSC Out CHOP]] - '''Fixed 'Send Rate' parameter''' for Sample and Transpose data formats.<br />
* [[Pangolin CHOP]] - Fixed cases where TouchDesigner could cause Pangolin BEYOND to crash.<br />
* [[Trigger CHOP]] - Fixed issue where the ADSR '''envelope would be incomplete''' when minimum sustain length was non-zero, in non-timesliced mode.<br />
<br />
'''SOP'''<br />
* [[Alembic SOP]] - Fixes to custom attribute importing.<br />
<br />
'''DAT'''<br />
* [[File In DAT]] / [[File In CHOP]] / [[File In SOP]] - Fixed issue which prevented some '''file changes being detected'''.<br />
** Fixed issue which prevented external edits to files being detected sometimes.<br />
* [[Folder DAT]] and File OPs - Fixed a '''crash which could occur when opening projects''' if there was a filesystem error for an external folder or file.<br />
* [[Folder DAT]] - Numerous improvements<br />
** Fixed an issue which prevented folders being matched if the pattern didn't end in '/' or '*'.<br />
** Fixed an issue which matched all extensions if none were set.<br />
** Fixed wrong values for dates (when enabled) on macOS.<br />
* [[Media File Info DAT]] - Fixed crash that can occur when deleting if the node hasn't cooked and '''improved behavior when 'File Open Timeout' is 0'''.<br />
<br />
* [[TCP/IP DAT]] - Fixed a bug on macOS where '''callbacks could be triggered out of order'''.<br />
<br />
'''MAT'''<br />
* [[Phong MAT]] - Fixed some issues when '''displacing vertices by the height map'''.<br />
<br />
<br />
'''Misc'''<br />
* [[TouchEngine]] - Fixed an issue which caused older hosts to receive 0 as min & max values for numeric '''custom parameters which weren't clamped'''.<br />
* [[MIDI]] - Fixed '''random MIDI messages''' when unplugging then re-plugging in devices.<br />
* [[Custom Operators]] - Added access to the '''Windows HISNTANCE''' as part of the OP_NodeInfo class.<br />
* [[OpenCV]] - Fixed '''<code>import cv2</code> not working on Intel macOS'''.<br />
* [[Python]] - Fixed an issue which caused a hang on quit on '''macOS after some external Python modules were imported'''.<br />
* Fixed nested panel sliders not being clickable in some panel layouts (eg <code>kantanMapper</code> drop menus not working).<br />
* Fixed '''issue entering unicode characters''' using the Windows IME.<br />
* Fixed a '''bug using '../' relative paths''' with the 'Relative to Tox File' path behavior.<br />
* Fixed file '''parameter tooltip''' so that it properly reflects the relative file path behavior.<br />
* '''Relative paths in bound file parameters''' are now evaluated using the base path of the bind master.<br />
* '''Custom parameters now use the relative file path behavior of their own node'''. Only the External <code>.tox</code> path uses the parent's path behavior.<br />
* Fixed '''custom menus not updating''' to selected value when names/labels are changed in same script.<br />
* Added ability to '''remove User Site Packages from Python Search Path'''.<br />
<br />
<br />
== Build 2023.11340 - Dec 18, 2023 ==<br />
<br />
=== New Features ===<br />
<br />
* [[MPCDI TOP]] - This new TOP lets you '''load calibration data stored in the MPCDI format'''. This can be used for projection and camera calibration data interchange between other applications. You can use the <code>projection</code> and <code>cameraTransform</code> python members of this operator in a [[Camera COMP]] to make use of the camera data contained in the configuration file. Please refer to [[MPCDI]] for a complete guide on TouchDesigners integration with the MPCDI Standard.<br />
* [[Audio Device In CHOP]] - For ASIO, added '''Resample option to the 'Rate Mode' parameter''' that will resample from the audio device's rate to the CHOP's rate.<br />
<br />
=== New Python ===<br />
<br />
* [[MidioutCHOP Class]]<code>.sendTimecode</code> - A new method that '''sends a full MTC (MIDI Timecode) message''' to the device.<br />
* [[Page Class]]<code>.appendFileSave()</code> - Unlike <code>appendFile()</code> which brings up a load dialog, this '''brings up a save dialog'''.<br />
* [[SyncoutCHOP Class]]<code>.timecode</code> - A new member for the '''timecode representation of the last sent index'''.<br />
* [[Timecode Class]] - '''Added <code>length</code> and <code>cycle</code> keywords''' to <code>tdu.Timecode()</code> so you can do countdowns.<br />
<br />
=== Palette and OP Snippets ===<br />
<br />
* [[Palette:audioAnalysis]] - v6.1.1 - Expose parameters for trend computations.<br />
* [[Palette:gestureCapture]] - v8.0.4 - Fixed error when there are 0 lines.<br />
* [[Palette:logger]] - v2.2.6 - Fixed a case where Logger COMP and other components depending on it would '''fail to initialize if TDLogs folder was missing'''.<br />
* [[Palette:opticalFlow]] - Fixed ''''Inverse' parameters not working'''.<br />
* [[Palette:multiLevel]] and [[Palette:geoPanel]] - Fixed the click-drag interactions with <code>multiLevel</code>, and <code>geoPanel</code>'s built-in <code>multiLevel</code>.<br />
* numerous new '''OP Snippets''' including 11 for new timecode features. We recommend to bring up Snippets and press '''Newest''' repeatedly to catch up on what you have missed.<br />
<br />
=== Bug Fixes and Improvements ===<br />
<br />
* Updated Leap Motion SDK to 5.17.1<br />
* Updated Orbbec SDK to 1.8.3<br />
<br />
'''COMP'''<br />
* [[Geometry COMP]] - Fixed '''instance texturing not working''' when texture index was given via a TOP.<br />
* [[GLSL COMP]] - Fixed '''crash when pixel shader is empty''' and added additional error messages for invalid shaders.<br />
* [[Nvidia Flow Emitter COMP]] - Fixed a crash that could occur.<br />
<br />
'''TOP'''<br />
* [[GLSL TOP]] - Fixed cases where non-preprocessor directives that are used in the '''Preprocess Directive DAT'' would get included twice (Note: this parameter should only be used for preprocessor directives).<br />
* [[Leap Motion TOP]] / [[Leap Motion CHOP]] - Updated SDK to version 5.17.1<br />
* [[Movie File In TOP]] - Fixed '''.hdr files loading upside down'''.<br />
* [[Movie File Out TOP]] - Fixed '''corruption on left of image''' when exporting [[Apple ProRes]] using 10-bit pixel format.<br />
* [[Movie File Out TOP]] - Automatically '''create non-existent folders''' when saving out a file if it doesn't already exist.<br />
* [[Orbbec TOP]] / [[Kinect Azure TOP]] - Updated to Orbbec SDK to 1.8.3<br />
* [[Orbbec TOP]] - Improvements<br />
** Added support for '''Y8 IR formats'''.<br />
** '''Sensor format and FPS for the current image type''' are now displayed in the info text.<br />
** Fixed a crash when using the node without the Kinect Azure package installed.<br />
** Added warnings for unrecognized image formats.<br />
<br />
* [[Point File In TOP]] / [[Point File Select TOP]] - Fixed a bug '''loading Zero, One or Active values from 2022 projects'''.<br />
* [[Screen Grab TOP]] - Fixed a '''memory leak on Intel GPUs'''.<br />
<br />
'''CHOP'''<br />
* [[Audio File Out CHOP]] - Fixed this node always crashing.<br />
* [[Body Track CHOP]] - '''3D positions are now scaled and flipped''' to better fit TouchDesigner coordinates.<br />
* [[MIDI Out CHOP]] - Added parameters for '''sending MIDI Timecode (MTC) as a stream of quarter frames'''.<br />
* [[Object CHOP]] - Fixed an infinite load loop on startup that would result in a hang.<br />
* [[Transform CHOP]] - Fixed a rotation '''error when output mode is set to Quaternion'''.<br />
<br />
'''Misc'''<br />
* [[macOS]] - Fixed crash on launch on some '''older macOS versions'''.<br />
* [[macOS]] - Fixed '''point rendering not working''' correctly on macOS.<br />
<br />
* [[Timecode]] - Fixed a bug with '''rate always coming from timeline''' when evaluating a CHOP as a timecode parameter.<br />
* Fixed an issue which could cause a '''crash or unexpected behavior when some Unicode characters appeared in file paths'''.<br />
* Fixed <code>tdu.Timecode</code> crash when using an invalid keyword argument.<br />
* Fixed the '''bug loading the SimSun-ext b font'''. This large font would not fit in the max allocated texture, so it now lowers the quality slightly so it will fit the texture.<br />
* '''Added 'Move Block' and 'Copy Block' options''' when dragging sequential parameters on the parameter dialog. Also '''added 'Paste Block' in parameter menu'''.<br />
<br />
<br />
== Build 2023.11290 - Dec 05, 2023 ==<br />
<br />
=== Key Highlights ===<br />
<br />
====OAK-D AI Sensors====<br />
'''[[OAK-D]] cameras offer a range of high-resolution cameras with depth vision and on-chip machine learning'''. OAK-D can run computer vision tasks on-device and send the processed images or data to TouchDesigner on both Windows and macOS. For example, an OAK camera can compute human skeleton landmarks for a live RGB image and send both the landmarks and image to TouchDesigner. OAK is short for the OpenCV AI Kit, which originated through online crowd-funding. [https://www.luxonis.com/ Luxonis] has expanded the line of OAK hardware and also released several open-source libraries such as DepthAI that run on the OAK.<br />
<br />
The aim of integrating TouchDesigner with OAK cameras is to facilitate novel interactions with the rest of the TouchDesigner environment while providing low-latency, high throughput performance with the OAK hardware. If you think a pure Python example that doesn't involve TouchDesigner is running faster than one which does, please let us know. For example, we aim for the frames-per-second of an OAK's RGB camera received in TouchDesigner to be at least as fast as what you would receive in pure Python with DepthAI and OpenCV.<br />
<br />
'''Three new OAK-D operators work together to implement the OAK functionality''': The [[OAK Device CHOP]] is the main interface to the camera devices. The [[OAK Select CHOP]] extracts channel and dictionary data from the camera results of a OAK Device CHOP. The [[OAK Select TOP]] extracts processed images from the camera. Each DepthAI model running on each camera will have one OAK Device CHOP plus one or more of the OAK Select OPs.<br />
<br />
<br />
====Machine Learning====<br />
The following features utilize machine learning models in their operation and are only supported on Windows OS. If you do not have the devices required to use them, you can save bandwidth and time by using the new Web Installer which does not include the models in the initial download, allowing you to select only the features you need.<br />
* [[Body Track CHOP]] - This new CHOP uses [https://developer.nvidia.com/maxine#ar-sdk Nvidia Maxine AR SDK] to perform '''body pose estimation''' on any video or camera input. It can track bounding boxes and 34 key points of one or more human bodies, with optional joint angles, in 2D or 3D.<br />
<br />
* [[ZED]] - Major overhaul including an SDK update and the addition of '''body tracking support''' in the [[ZED CHOP]] and a ''''Neural' depth camera mode''' in the [[ZED TOP]].<br />
<br />
* [[Orbbec]] - Body tracking in the [[Kinect Azure CHOP]] now also works with Orbbec Kinect-compatible-cameras (Femto Mega, Femto Bolt). Furthermore, general support for color/depth/pointcloud has been added for a wider range of Orbbec cameras via the [[Orbbec TOP]].<br />
<br />
* [[Nvidia Upscaler TOP]] - This new TOP uses [https://developer.nvidia.com/maxine#ve-sdk Nvidia Maxine Video Effects SDK] to upscale the resolution of an input video. The Upscale mode is faster and offers a 'Strength' parameter. The Super Resolution mode is higher quality and doesn't offer a Strength parameter, but it does have an optional 'Artifact Reduction' toggle.<br />
<br />
<br />
====Timecode Tools====<br />
Numerous [[Timecode]] tools have been woven into TouchDesigner. A new [[Timecode CHOP]] can create and manage SMTPE timecode and a large selection of OPs in TouchDesigner that deal with time have been updated to be driven by timecode or include a timecode member so they can be managed effectively. For a full list of these operators, refer to the [[Timecode]] page. <br />
* [[Timecode CHOP]] - '''A new CHOP for managing Timecode''' with custom length parameters and extra countdown field to [[Info DAT]].<br />
** See the [[Timecode Class]] which is the underlying python object to timecode everywhere.<br />
** Check out the new OP Snippets for this operator.<br />
<br />
* [[Timeline CHOP]] - Added a new parameter to '''drive timeline time with a timecode object'''.<br />
* [[LTC Out CHOP]] - Added a parameter to drive the LTC Out timecode with a Timecode Object/CHOP/DAT.<br />
* [[Timer CHOP]] - Added option in the 'Time Control' parameter to drive the Timer CHOP directly with timecode.<br />
<br />
* [[Timecode Class]] - A new class to '''access timecode features via python''' throughout TouchDesigner.<br />
<br />
* Many operators that can use timecode now have new '''<code>.timecode</code> members''' to access their timecode directly via python.<br />
<br />
<br />
==== Apple ProRes ====<br />
Full support for [[Apple ProRes]] in TouchDesigner on both Windows and macOS.<br />
* [[Movie File In TOP]] - Support for ProRes decoding. Uses hardware decoding on macOS when available.<br />
* [[Movie File Out TOP]] - Support for ProRes encoding. Uses hardware encoding on macOS. TouchDesigner's ProRes encoding has been certified by Apple for correct implementation of the format.<br />
* ProRes is equally supported across TouchDesigner, [[TouchPlayer]] and [[TouchEngine]].<br />
<br />
<br />
====Laser Control====<br />
* [[Laser Device CHOP]] - The Laser Device CHOP can send '''laser points to supported laser devices: EtherDream, Helios, and ShowNET'''. [https://www.laserworld.com/en/technical-explanations-overview/shownet-as-laser-mainboard.html ShowNET] support comes to TouchDesigner for the first time! The devices can be connected to a laser using an ILDA cable, except in the case of ShowNET when an onboard DAC is used. Applications of the Laser Device CHOP include displaying computer-generated shape animations or other special effects of a light show. The Laser Device CHOP replaces the deprecated [[EtherDream CHOP]] and [[Helios DAC CHOP]].<br />
<br />
* [[Laser CHOP]] - Added '''look-up CHOP for vertex hold min/max angles''' and '''added 'Blank State Channel'''' for help with debugging.<br />
<br />
<br />
====New Operators====<br />
===== Hardware Device Operators =====<br />
* [[MoSys CHOP]] / [[MoSys TOP]] - The MoSys CHOP receives data from a '''[https://www.mo-sys.com/ MoSys] camera tracking system. The channels can be used to control a virtual camera and to implement lens distortion''' via the MoSys TOP as part of a virtual production system.<br />
<br />
* [[Orbbec TOP]] - Support for color, depth, and point cloud capture has been added for a wide range of Orbbec cameras. Furthermore Kinect-compatible Orbbec camera such as the Femto Mega and Femto Bolt models also support Kinect body tracking through the [[Kinect Azure CHOP]].<br />
<br />
* [[SICK TOP]] - This new TOP can be used to retrieve point cloud data from a SICK LIDAR sensor. Sensor results are packed into a floating point texture where each pixel represents one point of data and each color channel stores one field such as x, y or z position. The TOP utilizes the '[https://github.com/SICKAG/sick_scan_xd/tree/master sick_scan_xd]' SDK and [https://github.com/SICKAG/sick_scan_xd/blob/master/REQUIREMENTS.md supported sensors] are listed on the project's GitHub page.<br />
<br />
* [[Audio Devices DAT]] / [[Video Devices DAT]] - Two new DATs which '''list all input and output audio/video devices'''. Callbacks are included to create actions when devices are added or removed.<br />
<br />
===== Micellaneous Operators =====<br />
* [[Bloom TOP]] - The Bloom TOP creates an '''intensity gain and glow effect around brighter parts of the image'''. (''refinements forthcoming'')<br />
<br />
* [[GLSL COMP]] - The new GLSL COMP '''uses GLSL shaders to render an image in a panel directly to the screen'''. It is useful for rendering pixel accurate UIs as the resolution will automatically adapt to the DPI scaling of the screen it is displayed on.<br />
<br />
<br />
====Engine COMP Overhaul====<br />
* [[Engine COMP]] - New features and improvements.<br />
** '''Enabled OP Viewer parameter''' on Common parameter page to show a selected viewer.<br />
** Added ''''Asset Paths' parameter to make relative paths''' based on the Project <code>.toe</code> file or the External <code>.tox</code> file.<br />
** Added '''TouchEngine process parameters''' on the Advanced parameter page. This allows you to quit or launch the process independently from loading your component.<br />
** Added ''''On Engine COMP Create' parameter''' which determines what happens when a <code>.tox</code> is loaded (also affects when a new Engine COMP is created through copy & paste).<br />
** '''Errors''' on the loaded component are '''now reported in the pop-up info text''' via middle-mouse button.<br />
** Added a new '''<code>onError()</code> callback''' to the Callback DAT.<br />
** Allow use of user selected operator colors (use color palette to set).<br />
<br />
* '''New Init Start parameter page''' modelled after Initialize Start on the [[Timer CHOP]] including a similar set of core control parameters.<br />
** Added “Ready when” parameter to specify when the transition to ''Ready'' state happens.<br />
** Added <code>onInitialize()</code> callback.<br />
** Added 'Go To Done' parameter and 'On Done' parameter to determine behavior. This include extras like an <code>onDone()</code> callback, a "<code>done</code>" channel, and "<code>goToDone()</code>" Python command similar to a Timer CHOP.<br />
** Added a 'Pre-Roll' parameter that will run the component for the specified amount of time before setting it to ''Initialized'' state.<br />
<br />
* '''Added a docked [[Info CHOP]]'''<br />
** More channels added in 'General' Info Type.<br />
** Added “Initialize Start” Info Type group of channels reporting on the Status of the Initialize Start features mentioned above.<br />
** Added 'TouchEngine Status' Info Type group of channels for process and component state to better understand the TouchEngine process lifetime.<br />
** Renamed Engine Perform to 'TouchEngine Perform'.<br />
** Added [[Info CHOP]] channels <code>output_cook_abs_frame</code>, <code>engine_absolute_frame</code>, <code>engine_absolute_seconds</code>, and <code>initialize_fail</code>.<br />
* '''Added a docked [[Info DAT]]'''<br />
** Added “<code>engine_pid</code>” to Info DAT for the process ID of the engine process.<br />
<br />
<br />
====Lightweight Web Installer for Windows====<br />
'''The best option for installing TouchDesigner on Windows is our new lightweight web installer'''. This installer packages the core elements of TouchDesigner into a significantly smaller download. During installation you can select the features of TouchDesigner you require and it will download them on-the-fly. If you don't have hardware like a Kinect Azure camera, ZED camera, or Nvidia GPU on your system, save time and bandwidth by skipping these items. With the addition of more devices, SDKs, and features using machine learning models, the full installer is now over 2.4GB and will continue to grow. The web installer is a great option for anyone working with a reliable internet connection. The download size is smaller, the installation goes more quickly, and TouchDesigner uses less space on your system. Only install what you need!<br />
<br />
'''Add additional features after the initial installation''' by going to ''Settings > Add or Remove Programs'' and locating your TouchDesigner application. Then select ''Modify'' from the options menu and the Modify installation dialog will open allowing you to select the features you'd like to add.<br />
<br />
We will always '''continue to maintain a full installer''' for those who need everything or need to install TouchDesigner on machines where there is no internet connection. <br />
<br />
For info on how to use the web installer see [[Install_TouchDesigner#Dealing_with_Installer_Components_of_the_Web_Installer]]<br />
<br />
<br />
====More New Features====<br />
<br />
===== Python 3.11 =====<br />
* Python upgraded to 3.11 - Runs 10-60% faster for everything, better error messages, more new and shiny! <br />
* Full update details [https://docs.python.org/3/whatsnew/3.11.html What’s New In Python 3.11] and [https://docs.python.org/3/whatsnew/3.10.html What’s New In Python 3.10]. (TouchDesigner's previous python version was 3.9.5)<br />
<br />
<br />
===== Custom Sequential Parameters =====<br />
<br />
[[Sequential Parameters]] are sets of parameters that can be dynamically repeated multiple times, grown and shrunk using the +/- buttons in the parameter dialog. We have revamped their naming and '''added support to custom parameters so users can now define their own blocks of sequential parameters'''. These can be defined directly with python or through the [[Component Editor Dialog]]. <br />
<br />
All sequential parameter sequences (both built-in and custom) now '''start with a new sequence parameter'''. The name of this sequence parameter defines the prefix of all the following parameters in that sequence block. The new naming format is: <code><sequence name><block index><parName></code>. <br />
<br />
Every sequence now has a "sequence name" which is added as a prefix to every parameter that is part of the sequence. This is followed by a "block index", which is the index of the block (set of associated parameters) within the sequence.<br />
<br />
For example, the name/value pars in a [[Constant CHOP]] used to be called <code>name0</code>/<code>value0</code>, <code>name1</code>/<code>value1</code>, etc. The new names are: <code>const0name</code>/<code>const0value</code>, <code>const1name</code>/<code>const1value</code> etc. Other notable examples are extensions (sequence name "<code>ext</code>") and internal operators (sequence name "<code>iop</code>")<br />
TouchDesigner will '''attempt to understand the old names as aliases, but there may be backwards compatibility issues''' in some cases. <br />
<br />
* [[TouchEngine]] and [[Engine COMP]] also fully support sequential parameters now.<br />
** TouchEngine - Added a the new sequence parameter type, added a function to change sequence block count.<br />
** TouchEngine - For hosts using older library versions, expose sequences as a series of regular parameters.<br />
** Engine COMP - Correctly display, edit and update parameter sequences, including changes to block count.<br />
<br />
<br />
<!--<br />
For example, let's look a the built-in sequential parameters in the Constant CHOP:<br />
<br />
<code>n.par.const</code> (New 'sequence' parameter)<br><br />
<code>n.par.const0name</code><br><br />
<code>n.par.const0value</code><br><br />
<br />
<code>n.par.const1name</code><br><br />
<code>n.par.const1value</code><br><br />
etc<br />
<br />
Access to any [[Sequence Class|sequence object]] is handled through this new parameter:<br />
<br />
<code>n.par.const.sequence.blockSize</code> <br />
<br />
<br />
'''To create Custom Sequential Parameters through python''':<br />
<br />
<code>n.customPages[0].appendSequence('S')</code><br />
<br />
You can attach parameters to that sequence through python:<br />
<br />
<code>n.par.S.sequence.blockSize = 3</code> (connects next 3 parameters to it).<br />
<br />
'''Alternatively use the Component Editor Dialog''' and create a new parameter of 'Sequence' type.<br />
--><br />
===== Working with External Files =====<br />
* New parameters on the Common page of all Components offer '''better control of managing external file locations and paths'''.<br />
* '''New parameter 'Relative File Path Behavior'''' allows you to use relative paths that are local to the Project (<code>.toe</code> file) or to the location of the External COMP (<code>.tox</code> file).<br />
* We invite you '''[https://derivative.ca/community-post/word-about-externals-202310k-builds/68166 to read our article]''' introducing some changes and new features. <br />
<br />
<br />
===== macOS Hardware Decoding =====<br />
* [[Movie File In TOP]] and [[Video Stream In TOP]] now supports '''hardware decoding''' when available (this is depends on the Mac's hardware). To enable on the Movie File In TOP, turn on the 'Hardware Decode' parameter toggle on the Tune page.<br />
** Supported codecs vary by hardware, potentially works for '''Apple ProRes, H.264, HEVC (H.265), P-JPEG, VP9, AV1'''.<br />
** When possible it does '''direct-to-texture decode''' - image memory is always on the GPU.<br />
<br />
<br />
===== Nvidia 40-series GPU Improved Support =====<br />
* The machine learning models for Nvidia operators using [https://developer.nvidia.com/maxine#ar-sdk Maxine SDKs] have been updated to include models for the 40-series Geforce and Professional A-series Ada generation GPUs.<br />
<br />
<br />
===== COMP Features =====<br />
* [[Text COMP]] - Added new 'Drop Shadow' parameter to '''draw a drop shadow under the text'''.<br />
* [[Engine COMP]] and [[TouchEngine]] - Fully '''support sequential parameters''' now.<br />
** TouchEngine - Added a the new sequence parameter type, added a function to change sequence block count.<br />
** TouchEngine - For hosts using older library versions, expose sequences as a series of regular parameters.<br />
** Engine COMP - Correctly display, edit and update parameter sequences, including changes to block count.<br />
<br />
===== TOP Features =====<br />
* [[Video Stream Out TOP]] - Now works with Non-Commercial licenses.<br />
<br />
* [[Movie File Out TOP]] - Added a new 'Limit Length' parameter to automatically '''stop recording when the output reaches a set length'''.<br />
<br />
* [[Noise TOP]] - Added ''''Derivative (slope)' toggle''' to get the '''gradient of the noise''' in the RGB channels. Only works in monochrome mode.<br />
* [[Render TOP]] - The ''''Image Output' feature has been reworked'''. Multiple can now be created, with custom names, array sizes and formats. This is found on the new 'Image' page.<br />
<br />
* [[Spectrum TOP]] - Revamped the '''Spectrum TOP to use Vulkan via the VkFFT library''', deprecating the CUDA and OpenCV usage. It results in much faster performance and cross platform support for both Windows and macOS.<br />
<br />
* [[Text COMP]] / [[Text TOP]] - New options for selecting fonts via a new ''''Typeface' parameter''' instead of the previous 'Bold' and 'Italics' parameters.<br />
<br />
* [[Video Device Out TOP]] - On [[Deltacast]] devices we added support for '''12-bit output and custom resolution output''' for HDMI/Displayport output.<br />
<br />
===== CHOP Features =====<br />
* [[Audio Device In CHOP]] - Added ''''Rate Mode' parameter for ASIO devices''' that can pull the sample rate from the device rather than manually override it.<br />
* [[Audio VST CHOP]] - Added support for '''custom bus layouts''' and new parameters for controlling the VST plugin's playhead.<br />
<br />
* [[Bind CHOP]] - New ''''Exclusive Hold' parameter'''. Locks out remaining inputs for this period when change detected.<br />
<br />
* [[FreeD In CHOP]] - Added 'Camera ID' parameter to allow '''filtering of camera packets and receiving date from multiple cameras'''.<br />
* [[Leap Motion TOP]] / [[Leap Motion CHOP]] - Gemini v5 tracking is now supported on macOS Apple Silicon. Go to the [[Leap Motion CHOP]] help page to locate the downloads required and instructions for installation. The Gemini v5 SDK was also updated for Windows.<br />
<br />
* [[OptiTrack In CHOP]] - Previously named the [[NatNet In CHOP]], we renamed it for clarity.<br />
<br />
* [[Pattern CHOP]] - Added a '''new 'Cyclic Ramp' ramp''' type.<br />
* [[Pulse CHOP]] improvements<br />
** Added a second input to '''specify custom pulse indices'''.<br />
** '''Multiple channels''' now supported.<br />
** Options to set '''minimum spacing''' values for pulses if they overlap.<br />
** '''Pulse height''' determined by the number of repeated indices.<br />
** Option to '''specify units''' for the pulse indices in samples, frames, or seconds.<br />
** Added ''''Connect' option to Interpolate parameter''' menu which gives true linear interpolation.<br />
<br />
* [[Timer CHOP]] - Numerous improvements<br />
** '''Timer now doesn't cook when it is not running''' - The Active toggle is expanded to be a menu''': Never / Always / While Running / While Playing. 'While Playing' only cooks if any timers are active and 'Play' is on.''' This now enables you to have many Timer CHOPs in your project without consuming significant compute time. <br />
** '''New 'Defer Parm Changes' parameter''' controls whether or not parameter changes take affect immediately or after the next init/start cycle. In the past, unlike most other operators in TouchDesigner where when a parameter changed it takes effect immediately, the Timer CHOP's Length, Cycle and other parameters didn't take effect until you Initialized. This was done to not disturb timers while they were running. Now it's a choice.<br />
<br />
* [[Transform CHOP]] - Added 'Xform Matrix/CHOP/DAT' parameter to '''apply a matrix transform directly'''.<br />
* [[Trigger CHOP]] - Added menu '''option 'Update once per Cycle'''' to update trigger shape parameters only once each cycle.<br />
<br />
===== DAT Features =====<br />
* [[Insert DAT]] - You can now '''add rows and columns via a cell expression on each row or column'''. Also added a new 'Replace if Duplicate Name' toggle to replace existing column/row names if new ones have the same name. This is a new convenient way to splice new rows or columns in.<br />
<br />
* [[Keyboard In DAT]] - '''Overhaul to how characters are handled''' with the goal to improve international language support and offer a more consistent interface with keyboard input. <br />
** '''BACKWARDS COMPATIBILITY ISSUE''' - The 'key' column will no longer return special characters such as <code>!@#$%^&*()</code>. These will now be <code>1234567890</code> for better consistency with other shortcut workflows.<br />
** '''New optional 'web_codes' column''', which matches the key code names that Chromium expects.<br />
** Reworked callback to take a namedtuple, add 'webCode' as a new value.<br />
<br />
<!--'''New Project Packager'''--><br />
<br />
=== New Python ===<br />
<br />
===== Python Version 3.11 =====<br />
* Python 3.11 - Runs '''10-60% faster''' for everything!<br />
* Create better error messages with <code>Exception.add_note()</code>. <br />
* [https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-pep678 PEP 678: Exceptions can be enriched with notes]<br />
* Full update details here: [https://docs.python.org/3/whatsnew/3.11.html What’s New In Python 3.11]<br />
* Python 3.10 - New [https://peps.python.org/pep-0636/ "<code>match</code>" statements]. Similar to "<code>switch</code>" in C++ and other languages. Full update details here: [https://docs.python.org/3/whatsnew/3.10.html What’s New In Python 3.10]<br />
<br />
===== opex() Method Instead of op() =====<br />
* [[OP Class]] / [[td Module]] - New <code>opex()</code> method that works identically to <code>op()</code>, except it '''will raise an exception if it fails to find the node''' instead of returning <code>None</code> as <code>op()</code> does. '''This is the new recommended way to get nodes in parameter expressions''', as the error will be more useful than 'NoneType has no attribute 'par', that is often seen when using <code>op()</code>, for example.<br />
<br />
===== Reset Parameters via Python =====<br />
* [[Par Class]] - <code>reset()</code><br />
* [[ParGroup Class]] - <code>reset()</code><br />
* [[Page Class]] - <code>resetPars()</code><br />
* [[OP Class]] - <code>.resetPars(parNames='*', parGroupNames='*', pageNames='*', includeBuiltin=True, includeCustom=True)</code><br />
<br />
<code>reset()</code> -> bool - Resets the associated parameters to their default state, returns <code>True</code> if anything was changed.<br />
<br />
op('geo1').par.tx.reset()<br />
op('geo1').parGroup.t.reset()<br />
op('geo1').pages[0].resetPars()<br />
op('player').customPages['Setup'].resetPars()<br />
op('player').resetPars(includeBuiltin=False) # only reset custom<br />
<br />
===== Default Parameters via Python =====<br />
* [[Par Class]] / [[ParGroup Class]]<code>.defaultBindExpr</code> <code>.defaultExpr</code> - Get or '''set the default bind expression''' on custom parameters.<br />
n.par.Float1.defaultBindExpr = 'me.par.Float2'<br />
n.par.Float1.defaultExpr = 'me.time.frame'<br />
<br />
* [[Par Class]] / [[ParGroup Class]]<code>.defaultMode</code> - For custom parameters get or '''set the default evaluation mode'''. Resetting the parameter sets it to <code>.defaultExpr</code> expression, so using the previous example n.par.Float1.defaultExpr = 'me.time.frame', then the expression would be set to me.time.frame.<br />
n.par.Float1.defaultMode = ParMode.EXPRESSION<br />
* [[Component Editor Dialog]] - Added features for default parameter modes.<br />
* [[TDJSON]] - Updated to work with default parameter modes.<br />
<br />
<br />
===== General Python Additions and Improvements =====<br />
* [[App Class]]<code>.systemFolder</code> - A new member that '''contains the installation folder''' for TouchDesigner system files.<br />
* [[App Class]].<code>processId</code> - A new member reporting the '''current process's ID'''.<br />
* [[App Class]].<code>tempFolder</code> - New member which '''reports the temporary files location'''.<br />
* [[AudiofileinCHOP Class]]<code>.timecode</code> - Gets the timecode of the audio file read index.<br />
<br />
* [[ClockCHOP Class]] - Added a new <code>.timecode</code> member.<br />
* [[COMP Class]].<code>delTD()</code> method is now properly called on extensions when operator is deleted.<br />
* [[DAT Class]] - <code>row()</code>, <code>col()</code>, <code>rows()</code>, <code>cols()</code> have a new bool argument `<code>val</code>`. `<code>val=True</code>` returns list of just cell entries instead of list of cells.<br />
* [[Dependency Class]]<code>.setVal(val, setInfo=None)</code> <code>.setInfo(Keyword, Optional)</code> - '''Optional information passed to the modified callback'''. Allows users to give more specific information when setting a value.<br />
* [[ListCOMP Class]] - Added <code>.dropRow</code> <code>.dropCol</code> members. The '''current row/col about to be dropped over'''.<br />
* [[MidiinCHOP Class]]<code>.timecode</code> - A new getter that grabs the timecode representation of the last set of quarter frame messages.<br />
* [[OakdeviceCHOP Class]] - Changed <code>masterTimecode</code>/<code>runningTimecode</code> to return a <code>tdu.Timecode</code> rather than a string. Also added a timecode getter that simply returns <code>masterTimecode</code>, similar to the [[Timer CHOP]].<br />
* [[OakselectCHOP Class]] / [[OakselectTOP Class]] - Added a <code>.timecode</code> member that returns the referenced OAK Device CHOP's master timecode.<br />
<br />
* [[OP Class]] received a number of updates to work with the updated [[Sequential Parameters]] features.<br />
** [[OP Class]]<code>.checkSequence()</code> -> list - Returns a (possibly empty) list of any [[ParGroup]] objects with unmatched sequence flags.<br />
** [[OP Class]]<code>.seq</code> - A new member which allows accessing sequences by name.<br />
For example:<br />
<br />
n.seq['Color'] # returns None if not found<br />
n.seq.Color # raises exception if not found<br />
<br />
* [[OP Class]]<code>.curBlock</code> - The SequenceBlock of the currently evaluated parameter.<br />
For example:<br />
<br />
me.curBlock.par.B # use in parameter A of each block<br />
<br />
<br />
* [[Page Class]].<code>sort()</code> - Allows Par and ParGroups as arguments (in addition to strings).<br />
* [[Page Class]]<code>.appendMenu(size=1)</code> - Now supports up to 4 menus in a single ParGroup.<br />
* [[Page Class]] / [[Cell Class]] - Comparisons to ''''None' vs None now work properly'''.<br />
<br />
* [[PanelCOMP Class]] - Added <code>.dropReady</code> for the current state of the drop operation. True when the drop will be accepted.<br />
* [[PanelCOMP Class]] - '''BACKWARDS COMPATIBLITY ISSUE''' - Panel.'''interactMouse/interactTouch will respect 'Enable' parameter''' toggle.<br />
* [[Par Class]] - Custom parameter order attribute is now a float and no longer limited to integers.<br />
* [[Par_Class]] - <code>.defaultMode</code> <code>.mode</code> undoable when changed in script.<br />
* [[Project Class]]<code>.quit()</code> - Added <code>exitCode</code> keyword argument, to manually specify an exit code on quitting.<br />
<br />
* [[Sequence Class]]<code>.blocks</code> - This now returns a list of [[SequenceBlock Class]] not list of tuples of Pars.<br />
'''BACKWARD COMPATIBILITY''' <code>sequence[3]</code> <code>sequence.blocks[6]</code> etc now returns a block, whose elements are now ParGroup objects, not Par objects.<br />
<br />
* [[Sequence Class]] - New <code>.par</code> and <code>.parGroup</code> members which return a list (one from each block) or <code>None</code>.<br />
<br />
For example:<br />
<br />
n.seq.Info.parGroup.T # entire list<br />
n.seq.Info.parGroup.T[3] # ParGroup from 4th block.<br />
n.seq.Info.parGroup['T'] # None if not found, else entire list<br />
<br />
n.seq.Info.par.Tx # entire list<br />
n.seq.Info.par.Tx[3] # ParGroup from 4th block.<br />
<br />
* [[SequenceBlock Class]] - For working with a block of parameters in a sequence.<br />
<br />
Can be accessed via:<br />
* <code>Sequence.blocks</code><br />
* <code>Sequence[''index'']</code><br />
* Iterating through Sequence<br />
<br />
<br />
Block members include <code>.index</code> <code>.owner</code> <code>.sequence</code> <code>.par</code> <code>.parGroup</code><br />
<br />
For example:<br />
for p in Block (iterating)<br />
len(Block) (number of pars)<br />
Block[index] (each par)<br />
<br />
* [[Timecode Class]] improvements<br />
** [[Timecode Class]]<code>.cycle</code> - A new member for getting/setting whether the timecode will cycle once it reaches its max (default value: True)<br />
** [[Timecode Class]]<code>.setLength</code> - A method for '''setting a custom length'''.<br />
** [[Timecode Class]]<code>.countdown</code> - A member of the Timecode object that is the difference between the current timecode value and the length.<br />
** [[TimerCHOP Class]]<code>.playingTimecode</code>/<code>.cumulativeTimecode</code> - Has been changed to return a <code>tdu.Timecode</code> object rather than a string.<br />
<br />
* [[TOP Class]] improvements<br />
** [[TOP Class]] - <code>cudaMemory()</code> now supports a 'stream' keyword argument. Use this to '''make use of a cudaStream_t/CUstream stream''' to do the work on.<br />
** [[TOP Class]] - Added <code>newestSliceWOffset</code> member for use with [[Texture 3D TOP]] generated textures in Python.<br />
** [[TOP Class]].<code>pixelFormat</code> - New member that '''returns the pixel format''' as a string.<br />
<br />
* [[scriptTOP Class]] - <code>copyCUDAMemory()</code> now supports a 'stream' keyword argument. Use this to '''make use of a cudaStream_t/CUstream stream''' to do the work on.<br />
<br />
* [[Run Command Examples|run]] function. The '''first argument can now be an optional function instead of a string'''. This can be easier to work with rather than constructing an executable line of code with embedded quotes.<br />
run( lambda: print('A') )<br />
run( lambda x: print(x), 'B' )<br />
run( print, 'C', 'D', 'E')<br />
** run(func) now accepts keywords. ie. run( myfunc, 'C', a=1, stop=True)<br />
<br />
* [[tdu_Module]].match - '''BACKWARDS COMPATIBILITY ISSUE''' - Now supports space separated patterns and single ^ terms properly. <code>tdu.match</code> interprets spaces in the pattern argument as separators.<br />
eg:<br />
tdu.match( "^foo", ["bar"] ) # ["bar"] <br />
tdu.match( "* foo", ["bar"] ) # ["bar"]<br />
<br />
* [[TDJSON]] - '''BACKWARD COMPATIBILITY ISSUE''' Including ''''eval' in extraAttrs argument''' list will now create a new "<code>eval</code>" entry in the JSON instead of replacing the value in "<code>val</code>".<br />
<br />
* Parameter members <code>.expr</code>, <code>.bindExpr</code>, <code>.defaultExpr</code>, <code>.defaultBindExpr</code> assigned to None in scripts will now be empty string instead of the string '<code>None</code>'. '''BACKWARDS COMPATIBILITY ISSUE'''<br />
<br />
* When Python parameter expression is blank, return None, not empty string. '''BACKWARDS COMPATIBILITY ISSUE'''<br />
<br />
<!--<br />
* [[PanelCOMP]].panel.dropready panel variable (matches PanelCOMP.dropReady member)<br />
* [[ListCOMP]].panel.droprow .dropcol panel variable (matches ListCOMP.dropRow .dropCol members)<br />
--><br />
<br />
=== New Palette ===<br />
<br />
* [[TDBitwig]] - TDBitwig is a set of TouchDesigner components that '''allow for communication between Bitwig Studio and TouchDesigner'''. For more information read our [https://derivative.ca/community-post/introducing-tdbitwig-bridging-touchdesigner-and-bitwig/68285 announcement here].<br />
** [[TDBitwig]] - About TDBitwig, a summary explanation and full list of the components available in the system.<br />
** [[TDBitwig User Guide]] - In-depth user guide covering installation usage and troubleshooting.<br />
<br />
* [[TDAbleton]] v2.3 - '''Added Change Global OP Shortcut feature''' to allow multiple instances, which allows you to connect to multiple Ableton Lives in one project.<br />
** v2.1.1 - Fixed defaults on the TDA package.<br />
** v2.2.0 - Currently playing '''arrangement clip info''' is now reflected in <code>abletonTrack</code> parameters<br />
** v2.2.0 - <code>RunRemoteCode</code> extension functions will no longer work when Listen Only is set on <code>tdaMaster</code> component. This can be overridden with an "<code>overrideListenOnly=True</code>" argument.<br />
** v2.2.0 - Added '''"Back To Arrangement" toggle''' on <code>abletonSong</code> - return tracks to arrangement control<br />
<br />
* [[Palette:cameraViewport]] - v0.39.0 - Added comments to help explain setup. '''Something to know:''' '''The latest version of <code>cameraViewport</code> is also always kept in the system component <code>/sys</code>''', so if you are using <code>cameraViewport</code> from the palette or prior version of TouchDesigner, and you turn on its Clone parameter, it will always be up to date going forward. i.e. new builds of TouchDesigner will update <code>cameraViewport</code> automatically.<br />
* [[Palette:camSchnappr]] - '''Inverted UI interaction''': ctrl+LMB will add points and ctrl+RMB will remove them. Interaction directly with the mouse (using no modifier keys) will control the camera now. Also upgraded P, Cd etc. identifiers in shaders.<br />
<br />
* [[Palette:debugControl]] - Version 1.4.0 - Added ability to '''print timestamp'''.<br />
* [[Palette:depthProjection ]] - Fixed the direction of the XY axes.<br />
<br />
* [[Palette:kantanMapper]] - All wireframe materials use Topology mode now. Removed <code>tscript</code> from Window COMP parameter and fixing typo in page name of <code>KantanUVHelper</code>.<br />
* [[Palette:kinectPointcloud]] - v1.0.2 - Updated to use the latest <code>pointRender</code> and <code>cameraViewport</code> components.<br />
<br />
<br />
* [[Palette:logger]] - v2.2.5 - A new palette '''component wrapping around the [https://docs.python.org/3/library/logging.html Python Logging Library]''' and interface to add additional Loggers easily in your TouchDesigner projects.<br />
** The logger COMP '''follows the propagation rules of the python library'''.<br />
** '''A Stream Handler was added''' to handle Textport log items. Therefore, when interacting with the logger COMP or the logger object directly, it will in most cases have an impact on both handlers (if used simultaneously). For example, when the setting changed is impacting the Logger object rather than an handler, such as the log level, or propagation. Status Bar is not using an handler.<br />
<br />
<br />
* [[Palette:particlesGpu]]<br />
** '''<code>Life</code> can be randomized''' or derived of an Effector input. Particles with alpha=0 will not be rendered.<br />
** New ''''Lifemodifier' parameter''' to multiply remaining lifetime with effector value.<br />
** Fixed source interpolation disabled when source input provided.<br />
** Particles are not created from source points that have alpha 0.<br />
** Simulation now stays stopped when timeline is paused and viewer is tumbled.<br />
** New default compositing setting (Discard Alpha) and fixed source only creating particles if source alpha greater 0.<br />
<br />
* [[Palette:pointRender]] - v1.2.2 - Updated to use the latest <code>cameraViewport</code> component.<br />
<br />
* [[Palette:popMenu]] - Fixed issue where title width wasn't incorporated into menu window width. Other cosmetics. Menu updates size when pars change.<br />
* [[Palette:quadReproject]] - v0.1.7 - Added support for '''multiple lights''' in the 'Lights' parameter.<br />
<br />
* [[Palette:recorder]] - A '''new folder called TDVS''' for general video server components. The first component is the '''recorder component''' which wraps a [[Movie File Out TOP]] for easier recording and encoding of videos.<br />
<br />
* [[Palette:searchReplace]] - Now searches the evaluated value of parameters as well as <code>val</code>, <code>expr</code>, <code>bindExpr</code>.<br />
* [[Palette:sickEngine]] - A new component to '''wrap the [[SICK TOP]] in an Engine COMP for connecting to more than one sensor''' in the same project.<br />
* [[Palette:stoner]] - Fixed '''Grid Warp mode not properly adjusting Bezier''' surface weights.<br />
<br />
* [[palette:lister]] and [[palette:treeLister]] - Bug fixes and improvements<br />
** Fixed a bug where reordering rows in lister can mangle a sync'd input table if not all Table DAT cols are displayed in lister.<br />
** Added '''<code>defaultAutoColDefine</code>''' and exposed ''''Word Wrap' parameter''' in config components.<br />
** Fixed bug where <code>SetCellLookName</code> function would override striping.<br />
<br />
* [[palette:treeLister]] - Further improvements<br />
* '''Optimized row selection and selection reporting'''. Exposed more inner members: <code>IDObjDict</code>, <code>ObjIDDict</code>, <code>GetObjectFromID</code>, <code>GetIDFromObj</code> (see [[Palette:treeLister]] for details).<br />
* '''Added 'Alphabetize Tree' parameter''' (default <code>True</code>) in case you don't want to alphabetize, which was forced in previous versions. Also fixes a bug where <code>treeLister</code> could sometimes sort twice when it only needs to sort once.<br />
** Added '''scrollbar controls''' to Tree parameter page.<br />
** Added ''''Expand All' pulse button''' and <code>ExpandAll</code> function to expose all tree nodes.<br />
** Fixed bug where <code>FromPathsSelectRows</code> would miss the first row.<br />
** Fixed bug where input mode with <code>wirePath</code> and <code>parentPath</code> columns would fail.<br />
** Fixed error messages on initial load.<br />
<br />
<br />
* [[Palette:webBrowser]] - Improvements<br />
** '''Added multitouch input''' to utilize the newly added multitouch input support in the [[Web Render TOP]]. <br />
** '''Added a Crop page''' and parameters for an additional cropped output (new second TOP output called ''Output 1'').<br />
* [[Palette:webRTC]] - Fixes and tweaks to the [[Palette:signalingServer|signaling components]] and webRTC components. <br />
** Internal loggers are all updated to the latest version of the Logger COMP.<br />
<br />
* <code>TransitMap</code> removed (before eventual replacement).<br />
<br />
<br />
=== Bug Fixes and Improvements===<br />
<!--2023.10130--><br />
'''SDK Updates'''<br />
* Upgrade to Nvidia Optical Flow to 4.0.11 - [[Optical Flow TOP]]<br />
* Upgrade to Nvidia Video Effects to 0.7.2 - [[Nvidia Background TOP]] / [[Nvidia Denoise TOP]] / [[Nvidia Upscaler TOP]]<br />
* Upgrade to Nvidia AR SDK to 0.8.2 - [[Face Track CHOP]]<br />
* Upgrade to JUCE v7.0.2 - [[Audio VST CHOP]]]<br />
* Upgrade to Kinect Body Tracking SDK to 1.1.2 [[Kinect Azure CHOP]]<br />
* Upgrade to Ableton Link SDK v3.0.6 - [[Ableton Link CHOP]]<br />
* Upgrade to Leap Motion SDK Windows v5.13.2 and MacOS v5.14.0 - [[Leap Motion TOP]] / [[Leap Motion TOP]]<br />
<!--2023.11170--><br />
* Upgrade to DepthAI 2.22.0 - [[OAK-D]] <br />
* Upgrade to [[OpenCV]] 4.8.0.<br />
* Upgrade to R3D SDK 8.4.0, used in the [[Movie File In TOP]] for decoding RED Camera codec in <code>.r3d</code> file format.<br />
* Upgrade to [[RealSense]] SDK 2.54.2 - [[RealSense TOP]] / [[RealSense CHOP]]<br />
* Upgrade to Substance SDK v9.0.1, this enables the use of '''E.6 Materials''' - [[Substance TOP]] -> [[PBR MAT]]<br />
<!--2023.11220--><br />
* Upgraded to [[ZED]] SDK 4.0.7 - [[ZED TOP]] / [[ZED CHOP]] / [[ZED SOP]]<br />
<br />
<br />
'''COMP Improvements'''<br />
<!--2023.10130--><br />
* [[Container COMP]] - Fixed a problem with the '''positioning of popup windows''' when panel opacity is below one.<br />
* [[List COMP]] - Don't edit cells if modifier (shift/ctrl/alt/etc) keys are used. Also fixed an out-of-bounds issue calling rollover with (max_row, max_col) instead of (-1,-1).<br />
* [[Text COMP]] - Improvements and bug fixes<br />
** Fixed an issue where '''text members were out of date''' if the view hadn't been displayed yet.<br />
** <code>onTextEditEnd()</code> callback is now inside the ''Text Value Change'' undo block to allow additional events to be added to the undo step.<br />
** UI Events are now flushed before the [[OP Viewer TOP]] captures a panel viewer to ensure it is up to date with the latest cook which '''fixed a case where Text COMP data might be a frame behind'''.<br />
<!--2023.11170--><br />
* [[Annotate COMP]] - New ''''Utility' parameter access to utility flag''' (when On, hides from searches).<br />
* [[Camera Blend COMP]] - Fixed the [[Line MAT]] using '''incorrect aspect ratio''' values when rendering with a blended camera.<br />
* [[Engine COMP]] - <code>.tox</code> files now have the '''external tox settings disabled on load'''.<br />
* [[Slider COMP]] - Fixed default component to '''accept changes to u and v via script'''.<br />
* [[Text COMP]] - Added a new parameter to '''parse escape sequences''' like '<code>\n</code>' and '<code>\t</code>' when using the Specification DAT. Also '''fixed vertical alignment''' when using the Specification DAT.<br />
* [[Geo Text COMP]] - '''Fixed 'Font Color'''' not working.<br />
<!--2023.11220--><br />
* [[Engine COMP]] - Fixed an issue which caused a Python error for old-style <code>onInitialize()</code> callbacks which don't return a value.<br />
* [[Text COMP]] - Fixed a bug when '''loading custom font files''' and added a warning message when the font fails to load.<br />
<br />
<br />
'''TOP Improvements'''<br />
* [[TOP]] - Channel mask on the Common page now '''works correctly for Mono and Alpha Textures'''.<br />
* [[TOP]] - Pixel inspector tool now gives '''pixel-centered UV values'''.<br />
<br />
* [[CHOP to TOP]] - Fixed '''16-bit float formats''' not working.<br />
* [[Movie File Out TOP]] - [[NotchLC]] - Fixed bug in '''NotchLC encoder''' that caused files to end up larger than expected.<br />
* [[Video Device In TOP]] - [[Info DAT]] no longer includes output devices.<br />
<br />
* [[GLSL TOP]] - Added 'TOPs' parameter to '''reference other inputs via parameter''' instead of a wired input.<br />
* [[Leap Motion TOP]] / [[Leap Motion CHOP]] - Added SDK version to the info popup, updated v5 Gemini SDK for both Windows and macOS<br />
* [[Lookup TOP]] - Dark/Light UV values will no longer be clamped at 0 on the low end.<br />
* [[Noise TOP]] - '''Fixed Simplex2D noise''' so that when the 'Derivative (Slope) parameter is toggled On, RGB channels get the XYZ noise derivatives.<br />
* [[Normal Map TOP]] - Fixed bug that could case '''NaN output values''' when using inputs textures with values greater than 1.<br />
* [[Nvidia Background TOP]] / [[Nvidia Denoise TOP]] / [[Nvidia Upscaler TOP]] - Fixed handling of '''32-bit input textures'''. Note: output will still be 8 bit fixed.<br />
* [[Optical Flow TOP]] - Improvements<br />
** Adding new ''''Pre-Shrink' parameter'''.<br />
** '''BACKWARD COMPATIBILITY ISSUE''' - 'Cost Output' values are now normalized to 0-1, instead of 0-255.<br />
<br />
<br />
* [[Point File In TOP]] / [[Point File Select TOP]] - Multiple changes that are backward compatibility issues <br />
** '''BACKWARD COMPATIBILITY ISSUE''' - '''Altered how the output texture size is determined''' based on the number of points. Might result in different texture sizes than previous versions.<br />
** '''BACKWARD COMPATIBILITY ISSUE''' - '''Field parameters are now stored as strings''' rather than indices.<br />
* [[Video Device In TOP]] - Improved AJA support to work with '''dual UHD inputs for Kona HDMI devices'''.<br />
* [[Video Stream In TOP]] - Added 'Active' parameter.<br />
* [[Web Render TOP]] - Added support for '''H264 playback and multitouch input''' and fixed a crash which could occur when loading a project.<br />
<br />
<br />
'''CHOP Improvements'''<br />
* [[Audio File In CHOP]] - Added support for '''driving the audio file index with a timecode''' reference.<br />
* [[Audio VST CHOP]] - '''Added timestamp argument''' to <code>onReceiveMidi()</code> callback.<br />
** [[AudiovstCHOP Class]]<code>.send</code>/<code>.sendExclusive</code> - Added '''<code>timestamp</code> keyword''' argument.<br />
<br />
* [[Info CHOP]] - Added '''"All" info type to display all info available'''.<br />
<br />
* [[Logic CHOP]] - ''''Convert Input'''' menu indexing fixed.<br />
* [[Lookup CHOP]] - '''Added 'Extend Condition' menus''' with options for 'Use Input' and the standard extend options found elsewhere ie. (Hold, Cycle, etc).<br />
<br />
* [[Body Track CHOP]] - Static input images are now reprocessed when the parameters change.<br />
* [[DMX Out CHOP]] - Fixed bug with sACN/KiNET/ArtNet where '''only the first channel might be sent in Packet Per Channel mode'''.<br />
* [[Face Track CHOP]] - '''Face mesh is now included in the Config/Models folder''' and the 'Mesh' parameter now defaults to the included mesh file. Also made sure that static input images are reprocessed when the parameters change.<br />
* [[LTC Out CHOP]] - '''Added 'High FPS Behavior' menu''' with the options to cycle or duplicate frames for high frame rate scenarios.<br />
* [[Timer CHOP]] - Various improvements<br />
** Next Segment / Prev Segment now updates <code>.masterSeconds</code> properly.<br />
** Stop resetting <code>.masterSeconds</code> each cycle.<br />
** Fixed dropped pulse values.<br />
<br />
* [[Audio Device In CHOP]] - Added the option to '''select device by index''' rather than name for ASIO and CoreAudio.<br />
* [[Clock CHOP]] - '''Fixed 'Since Program Start'''' mode having incorrect start time.<br />
* [[Transform CHOP]] - Fixed '''Quaternion Lerp and Slerp''' input blend behavior.<br />
<br />
* [[Audio Stream In CHOP]] - Added an 'Active' parameter.<br />
* [[Body Track CHOP]] / [[Face Track CHOP]] - Fixed '''tracking issues when using a floating point input texture'''.<br />
<br />
* [[Lag CHOP]] - '''Clamp 'Lag' and 'Overshoot'''' parameters to never be less than zero.<br />
* [[Timecode CHOP]] - Added 'Cycle' toggle.<br />
<br />
<br />
'''DAT Improvements'''<br />
* [[MQTT Client DAT]] - '''Added topic argument''' to <code>onPublish()</code> callback.<br />
* [[OP Find DAT]] - 'Include Utility Off' no longer includes children of utility nodes.<br />
* [[UDP In DAT]] / [[TCP/IP DAT]] / [[Touch In DAT]] / [[Touch Out DAT]] / [[OSC In CHOP]] - Updated the way TCP and UDP sockets bind to ports. We now can '''issue more warnings depending on the status of the port''' and how the binding of the socket went, for example, if the port is already in use or not. Windows only.<br />
<br />
* [[Art-Net DAT]] - '''Removed local port parameter''' as it is redundant and can conflict with the receiving socket.<br />
* [[Folder DAT]] - '''Improved performance by optimizing filesystem check''' and fixed a crash which could occur loading a project.<br />
** This optimization also improves performance when a file changes in any File In operator.<br />
* [[Render Pick DAT]] - '''Now works without any DAT input connected''', so the Python <code>pick()</code> method can be used without a dummy input.<br />
* [[Web Server DAT]] - '''Fixed <code>onServerStop()</code> callback''' not triggered when 'Restart' parameter is pulsed. Furthermore, an optimization to shut down the web server when its parent component cooking is disabled was added.<br />
<br />
* [[Parameter DAT]] - Added '''page name filtering''' and a toggle to output a column with the page that each parameter belongs to.<br />
<br />
'''MAT Improvements'''<br />
* [[Line MAT]] - Now '''supports draw vectors''' for point primitives.<br />
* [[PBR MAT]] - Can take advantage of the upgrades to the [[Substance TOP]] SDK which supports the '''latest Substance Designer <code>.sbsar</code> materials'''.<br />
<br />
'''SOP Improvements'''<br />
* [[SOP]] operators now support saving their contents in the following formats '''<code>.dae</code>, <code>.3ds</code>, <code>.dxf</code>, <code>.obj</code>''' (in addtion to <code>.fbx</code>).<br />
* [[Add SOP]] - Fixed bug that prevented the point sequence parameters from working.<br />
* [[Blend SOP]] - Fixed crash when blend weights reached 0.<br />
* [[Text SOP]] - Fixed crash in some cases when using a font file.<br />
<br />
* [[Point SOP]] - Fixed '''incorrect new attribute values''' in some cases when an attribute is deleted.<br />
<br />
* [[Texture SOP]] - '''BACKWARD COMPATIBILITY ISSUE''' - Fixed '''UV stretching and shearing of 'Face' type mapping'''. This changes the behavior of 'Face' type option.<br />
<br />
<br />
===== Other Improvements =====<br />
* [[SearchReplace_Dialog|Search / Replace Dialog]] '''now searches the evaluated value of parameters as well''' as <code>.val</code>, <code>.expr</code>, and <code>.bindExpr</code>.<br />
* Improved accuracy of '''GPU timing calculations'''.<br />
* Fixed password dialog sometimes not opening on top of other windows.<br />
* Fixed floating network editors sometimes being always on top.<br />
* Fixed parameter dialog to not show default parameters in non-default mode (eg: '<code>./help</code>' and '<code>repositioncomp</code>' in containers)<br />
* Fixed Global OP shortcuts not registering properly on external <code>.tox</code> files.<br />
* Fixed spurious errors when using [[Page_Class|Page]]<code>.appendPar()</code><br />
* TOP viewer pixel value picking (when viewer is active) now works correctly for 3D textures and Cube Map textures.<br />
* Added definitions for '''media keys''' on keyboards i.e. AudioVolumeUp, BrowserBack, etc<br />
* Added drag and drop support for '''FLAC audio files'''.<br />
* <code>dragEnd</code> callback <code>droppedOn()</code> now distinguishes between Par and ParGroup.<br />
<br />
* [[Custom Operators]] - '''Added '<code>cookCount</code>' member''' to the OP_NodeInfo class.<br />
* [[Privacy]] - Improved support for '''nested private components'''. A private component's children now have access to their parents, even if those parents have their own privacy.<br />
* [[Network Utilities: Comments, Network Boxes, Annotates]] - Comments, Network Boxes and Annotates now have a ''''Utility' parameter for turning on and off utility mode'''. Utility mode distinguished whether it's treated as a real node or a hidden node, a subtle difference.<br />
* Fixed '''incomplete panel layouts''' when parents employ children scaling.<br />
* <code>.tox</code> files are now saved with the '''external tox parameter turned off'''.<br />
* Fixed being able to use backspace or delete in input boxes are are not editable.<br />
<br />
* Improved the behavior of the '''value ladder on Remote Desktop/VNC/Synergy/Parsec''' etc.<br />
* Fixed dialog window (ie. colorpicker) '''sizes slowly getting larger''' when repeatedly opened.<br />
* Fixed a case where '''Unicode characters in a external file's filepath''' could cause a crash.<br />
* Stopped '''auto-connecting of component inputs or outputs''' when drag and dropping or pasting a component into the network editor.<br />
<br />
<br />
===== Licensing =====<br />
* On Windows, TouchDesigner's '''License System Codes are now generated differently''' to reduce the chance of a system code change when applying Windows Updates. Old keys will work in this 2023.10k branch, however, new keys created in this 2023.10k branch will not work with older versions of TouchDesigner. We also have release an update to 2022.20k branch so any builds released after July 10, 2023 will also work with the new keys created in this 2023 version. '''In summary - If you want to use 2022 and 2023 versions with the same key, either a) create your key using 2022 builds, or b) use a 2022 build released after July 10, 2023'''.<br />
* '''Errors are now provided''' when [[Floating Cloud Licenses|Floating Cloud]] and [[License Dongle|Dongle]] licenses are expired for the current build.<br />
* '''[[Floating Cloud Licenses|Floating Cloud]] licenses won't be consumed anymore''' if a better [[License Dongle|Dongle]] license is present on the system. Furthermore, floating cloud or dongle licenses won't be used if a higher level local license is installed through the [[Key Manager Dialog]].<br />
<br />
<br />
===== Panel Layout Optimization =====<br />
* Lots of work was done to '''speed up internal panel layout code''' resulting in many control panels performing significantly faster. If you discover regressions or control panels that are still extremely slow, please contact us via the [https://forum.derivative.ca/ bugs forum].<br />
<br />
<br />
=== Operator Snippets ===<br />
<br />
* New snippets for [[Body Track CHOP]], [[Timecode CHOP]], [[Bloom TOP]] and numerous updates to other OPs.<br />
<br />
===Backward Compatibility===<br />
'''Change for keys on Windows systems'''<br />
* TouchDesigner's License System Codes are now generated differently to reduce the chance of a system code change when applying Windows Updates. '''Old keys will work in this 2023.10k branch''', however, '''new keys created in this 2023.10k branch will not work with older versions''' of TouchDesigner. <br />
* We have released an update to 2022.20k branch so any builds released after July 10 2023 will also work with the new keys created in this 2023 version. '''In summary - If you want to use 2022 and 2023 versions with the same key, either a) create your key using 2022 builds, or b) use a 2022 build released after July 10 2023''' (yet to be released).<br />
* If you need to use older versions of TouchDesigner alongside 2023 with the same key, create your key with the older version (ie. 2019, 2020, 2021, etc) and it work for all newer versions.<br />
<br />
<br />
'''File Compatibility'''<br />
<br />
⚠️ Project <code>.toe</code> '''files saved in 2023 Official builds can not be loaded back into previous versions of TouchDesigner such as 2022 or 2021 builds.'''.<br />
<br />
<br />
'''Backward Compatibility Changes'''<br />
<br />
We try to make upgrading to new TouchDesigner branches as painless as possible, but sometimes changes are made that are not compatible with the feature set in older builds. These are difficult decisions and we do not take them lightly, but we move forward with such changes when it is clear that they will benefit the TouchDesigner platform in the long term.<br />
<!--* '''BACKWARD COMPATIBILITY ISSUE''' - check with Greg / Rob re removing some python names which were obsoleted in 2022.Official but left in for posterity. .masterSample,.masterFrame, .running....--><br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - '''<code>tdu.match</code> interprets spaces''' in the pattern argument as separators.<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - The '''[[Keyboard In DAT]]'s 'key' column will no longer return special characters such as <code>!@#$%^&*()</code>'''. These will now be <code>1234567890</code> for better consistency with other shortcut workflows.<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - '''Parameter expressions assigned to <code>None</code> in scripts will now be empty string''' instead of the string <code>'None'</code>.<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - '''When Python parameter expression is blank, return <code>None</code>''', not empty string.<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - '''<code>Panel.interactMouse()</code>/<code>.interactTouch()</code> will respect a panel's 'Enable'''' parameter toggle.<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE'''- [[Optical Flow TOP]] - ''''Cost Output' values are now normalized to 0-1''', instead of 0-255.<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - [[TDJSON]] - Including ''''<code>eval</code>' in <code>extraAttrs</code>''' argument list will now create a new "<code>eval</code>" entry in the JSON instead of replacing the value in "<code>val</code>".<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - [[Point File In TOP]] / [[Point File Select TOP]] - Altered '''how the output texture size is determined''' based on the number of points. Might result in different texture sizes than previous versions.<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - [[Point File In TOP]] / [[Point File Select TOP]] - '''Field parameters are now stored as strings''' rather than indices.<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - [[Sequence Class]]<code>.blocks</code> - This now returns a list of [[SequenceBlock Class]] not list of tuples of Pars. <code>sequence[3]</code> <code>sequence.blocks[6]</code> etc now returns a block, whose elements are now <code>ParGroup</code> objects, not <code>Par</code> objects.<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - Several built-in parameters have been renamed for consistency, starting with index <code>0</code>, etc. Older files will load correctly and get updated when saved, but note that '''files saved in 2023.10k builds will cause issues if loaded into any previous builds.'''<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - [[Texture SOP]] - Fixed '''UV stretching and shearing of 'Face' type mapping'''. This changes the behavior of 'Face' type option.<br />
<br />
* '''BACKWARD COMPATIBILITY ISSUE''' - '''Parameter order gets overridden''' when changing a Parameter's page member.<br />
<br />
<br />
== Experimental Builds 2023.10000 - Nov 15, 2023 ==<br />
<br />
For experimental release notes in this branch refer to [[Release_Notes/Experimental|Experimental Release Notes]]<br />
<br />
<br />
== Official Builds 2022.20000 and earlier - Oct 31, 2023 ==<br />
<br />
For earlier Official Build release notes refer to [[Release_Notes/2022.20000|Official 2022.20000 Release Notes]]</div>Robhttps://docs.derivative.ca/index.php?title=Sequential_Parameters&diff=30789Sequential Parameters2024-01-18T21:44:26Z<p>Rob: </p>
<hr />
<div>{{Glossary<br />
|Title=Sequential Parameters<br />
|Short=Sequential Parameters are sets of parameters (sequence blocks) that can be dynamically repeated multiple times.<br />
|Long=<br />
}}<br />
<br />
== The Basics ==<br />
<br />
Sequential Parameters are sets of parameters (sequence blocks) that can be dynamically repeated multiple times. For example, the [[Add SOP]] lets you create multiple points by clicking the + button in the parameter dialog.<br />
<br />
All parameter sequences start with a sequence header parameter with a + and - button, followed by one or more "blocks" of parameters. The image below shows the parameter dialog for [[Add SOP]]'s Points page. The sequence header has the label "Point", and is followed by two sequence blocks, each block containing a Position and a Weight parameter.<br />
<br />
[[File:seqpars.png]]<br />
<br />
The parameters in sequence blocks are named in the form:<br />
<br />
:<code><sequence name><sequence index><parameter name></code><br />
<br />
* ''sequence name'': the sequence name, which is also the name of the sequence's header parameter<br />
* ''block index'': the zero-based index of the block in the sequence<br />
* ''parameter name'': the descriptive name of the parameter<br />
<br />
In the example below, the sequence parameters are expanded to show their Python names. The sequence name is "point". <br />
<br />
[[File:Expanded seq.png]]<br />
<br />
You can add and remove sequential parameter blocks in multiple ways. The + and - buttons in the header add and remove sequence blocks respectively. You can also choose Insert Block or Remove Block in the RMB menu after right-clicking on a block parameter's name in the parameter dialog. Lastly, you can use Python (see Python section below) <br><br />
<br />
=== Sequence Helpers for Parameter Expressions ===<br />
<br />
In a parameter expression, you can use: <br />
* <code>me.curSeq</code> to access the sequence of the parameter currently being evaluated. <br />
* <code>me.curSeq.numBlocks</code> to access the number of blocks in the sequence of the parameter currently being evaluated. <code>len(me.curSeq)</code> works too.<br />
* <code>me.curBlock</code> to access the [[SequenceBlock_Class|sequence block]] of the parameter currently being evaluated. <br />
* With that you can refer to any other parameter in the block, for example, <code>me.curBlock.par.speed</code>, not needing to specify the sequence name or block number.<br />
<br />
Below are some examples:<br />
<br />
[[File:CurBlock.png]]<br />
<br />
See what else you can use here: [[Sequence Class]], [[SequenceBlock Class]], [[SequenceCollection Class]].<br />
<br />
<br />
== Creating Custom Sequential Parameters ==<br />
<br />
You can create custom sequential parameters on your components using the [[Component Editor Dialog|Component Editor]]. You can create a sequence in two ways:<br />
=== Method One ===<br />
# Create a Sequence parameter, which creates the sequence header<br />
# Create the block parameters you want below the Sequence parameter<br />
# Change the Sequence parameter's <code>numBlocks</code> to the number of block parameters you created<br />
=== Method Two ===<br />
# Create the block parameters you want <br />
# Select the block parameters <br />
# Right-click on one of the selected parameters and choose Create Sequence <br />
=== Adding and Removing Parameters from the Sequence ===<br />
There are a few ways to add or remove parameters from a sequence:<br />
* Drag them into or out of the sequence.<br />
* Select them in the parameter list and choose Add To Sequence or Remove From Sequence in the RMB menu.<br />
* Change the <code>numBlocks</code> member of the Sequence header parameter.<br />
<br />
== Working with Sequential Parameters in Python ==<br />
<br />
There are a number of utility classes, members, and methods that allow you to work with sequential parameters in Python. This section will give an overview of these features, but for detailed documentation please refer to: [[Sequence Class]], [[SequenceBlock Class]], [[SequenceCollection Class]]<br />
<br />
=== Sequence Objects ===<br />
'''[[Sequence Class|Sequence objects]]''' are the main interface for interacting with parameter sequences in Python. They can be accessed via the <code>sequence</code> member of any parameter in a sequence or via the sequence name and '''[[SequenceCollection Class|seq]]''' member of operators.<br />
<br />
<syntaxhighlight lang=python><br />
mySequence = op('/add1').par.point0posx.sequence # get the sequence object<br />
sameSequence = op('/add1').seq.point # another way to get the sequence object<br />
</syntaxhighlight><br />
<br />
Every sequence has a unique '''sequence name'''. This name is used to identify the sequence and to prefix the names of all block parameters. It is also the name of the sequence header parameter. You can find the sequence name by hovering over the sequence header's label or by looking at the block parameter names. It is also stored in the sequence object's <code>name</code> member.<br />
<br />
=== Sequence Blocks ===<br />
'''[[SequenceBlock Class|Sequence blocks]]''' are the blocks of parameters that are repeated in parameter sequences. The blocks in a sequence can be accessed and controlled using through the Sequence object. The following examples use the <code>point</code> sequence shown in the ADD SOP images above.<br />
<br />
<syntaxhighlight lang=python><br />
seq = op('/add1').seq.point # get the sequence object with the name "vec"<br />
alsoSeq = op('/add1').seq['point'] # you can also use bracket notation<br />
allBlocks = seq.blocks # list of all sequence blocks<br />
count = len(seq) # number of sequence blocks<br />
firstBlock = seq[0] # first block in the sequence<br />
print(firstBlock.index) # print the parameter block's index within the sequence. 0 in this case<br />
</syntaxhighlight><br />
<br />
You can also use the sequece object to control the number of blocks in the sequence:<br />
<br />
<syntaxhighlight lang=python><br />
seq.numBlocks = 4 # set the number of blocks to 4<br />
seq.insertBlock(2) # insert a block at position 2<br />
seq.destroyBlock(0) # destroy the first block<br />
</syntaxhighlight><br />
<br />
Sequence blocks provide easy access to the parameters within the block, using the familiar <code>[[ParCollection Class|par]]</code> and <code>[[ParGroupCollection Class|parGroup]]</code> collection classes. Note that when accessing parameters from a sequence block, you use their base names (no sequence prefix) instead of their full names. The examples below illustrate this, again using the Add SOP images above:<br />
<br />
<syntaxhighlight lang=python><br />
seq = op('/add1').seq.point # get the sequence object with the name "vec"<br />
block = seq[1] # second block in the sequence<br />
<br />
block.par.weight = 3 # access the block's "weight" parameter. Its actual name is "point1weight"<br />
block.par['weight'] = 4 # you can also use bracket notation<br />
block.parGroup.pos = [1,1,1] # access the block's "pos" parameter group.<br />
</syntaxhighlight><br />
<br />
There are a number of ways to iterate through a given parameter in each block:<br />
<br />
<syntaxhighlight lang=python><br />
seq = op('add1').seq.point<br />
<br />
# print the value of all weight parameters<br />
<br />
# using Sequence.blocks<br />
for block in seq.blocks:<br />
print(block.par.weight)<br />
<br />
# using Sequence[blockIndex]<br />
for index in range(len(seq)):<br />
print(seq[index].par.weight.eval())<br />
<br />
# using Sequence.blockPars:<br />
for weightPar in seq.blockPars.weight:<br />
print(weightPar.eval())<br />
</syntaxhighlight><br />
<br />
=== Sequence Helper Members in Parameters and ParGroups ===<br />
<br />
There are a few helper members to work with sequences, built directly into parameters and parGroups:<br />
<br />
<syntaxhighlight lang=python><br />
# parameter helpers<br />
par = op('/add1').par.point0weight <br />
print(par.sequence) # prints the sequence object. Will be None if the parameter is not in a sequence<br />
<br />
# parGroup helpers<br />
parGroup = op('/add1').parGroup.point1pos <br />
print(parGroup.sequence) # prints the sequence object. Will be None if the parGroup is not in a sequence<br />
print(parGroup.sequenceIndex) # prints the index of the parGroup's sequence block within the sequence. 1 in this case<br />
print(parGroup.blockIndex) # prints the index of the parGroup within its block. 0 in this case (it is the first par in the block)<br />
</syntaxhighlight><br />
<br />
<br />
<br />
<br />
[[Category:Touch Glossary]]<br />
[[Category:Panes]]<br />
[[Category:TDPages]]</div>Robhttps://docs.derivative.ca/index.php?title=Sequence_Class&diff=30625Sequence Class2023-12-20T19:38:39Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=Sequence|summary=An object describing and controlling a set of [[Sequential Parameters|sequential parameters]]. Accessed via the <code>sequence</code> member of [[Par Class|parameters]] or the OP.seq [[SequenceCollection Class|Sequence Collection]]. <br />
<syntaxhighlight lang=python><br />
mySequence = op('/base1').par.iop0shortcut.sequence # get the sequence object<br />
alsoMySequence = op('/base1').seq.iop # another way to get the sequence object<br />
<br />
# A sequence block is a SequenceBlock object, which gives access to one set of parameters in the sequence.<br />
print(len(seq)) # number of sequence blocks in the sequence<br />
print(seq[0]) # first sequence block in the sequence<br />
for parBlock in seq:<br />
print([par for par in parBlock]) # print all sequence blocks<br />
seq.numBlocks += 1 # add a new sequence block (same as pressing + in the UI)<br />
<br />
</syntaxhighlight><br />
See also: [[Sequential Parameters]], [[SequenceBlock Class]], [[SequenceCollection Class]]<br />
}}<br />
<section begin=HELPBODY /><br />
<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items={{ClassMember<br />
|class=Sequence<br />
|name=blockSize<br />
|type=int<br />
|set=1<br />
|text=Get or set the sequence blocksize.}}<br />
{{ClassMember<br />
|class=Sequence<br />
|name=blocks<br />
|type=<br />
|set=0<br />
|text=The set of all blocks in this sequence. A block is a set of parameters which can be repeated in an operator. See [[SequenceBlock Class|SequenceBlock]] class.}}<br />
{{ClassMember<br />
|class=Sequence<br />
|name=maxBlocks<br />
|type=int or None<br />
|set=0<br />
|text=The maximum number of blocks allowed in the sequence, or None if limitless.}}<br />
{{ClassMember<br />
|class=Sequence<br />
|name=name<br />
|type=str<br />
|set=1<br />
|text=Get or set the sequence name, which affects all its parameter names.}}<br />
{{ClassMember<br />
|class=Sequence<br />
|name=numBlocks<br />
|type=int<br />
|set=1<br />
|text=Get or set the total number of parameter blocks in this sequence.}}<br />
{{ClassMember<br />
|class=Sequence<br />
|name=owner<br />
|type=OP<br />
|set=0<br />
|text=The OP to which this object belongs.}}<br />
{{ClassMember<br />
|class=Sequence<br />
|name=blockPars<br />
|type=list<br />
|set=0<br />
|text=An intermediate parameter collection object, from which specific sequence parameters can be found.<br />
Returns a list of one parameter from each block.<br />
<syntaxhighlight lang=python><br />
n.seq.Info.blockPars.Tx<br />
n.seq.Info.blockPars.Tx[3] #Par from 4th block.<br />
</syntaxhighlight><br />
<br />
<syntaxhighlight lang=python><br />
n.seq.Info.blockPars['Tx'] #returns None if not found.<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=Sequence<br />
|name=blockParGroups<br />
|type=list<br />
|set=0<br />
|text=An intermediate parGroup collection object, from which specific sequence parameter groups can be found.<br />
Returns a list of one parGroup from each block.<br />
<syntaxhighlight lang=python><br />
n.seq.Info.blockParGroups.T<br />
n.seq.Info.blockParGroups.T[3] #ParGroup from 4th block.<br />
</syntaxhighlight><br />
<br />
<syntaxhighlight lang=python><br />
n.seq.Info.blockParGroups['T'] #returns None if not found.<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=Sequence<br />
|name=sequencePar<br />
|type=<br />
|set=0<br />
|text=The main sequence parameter defining this sequence.}}<br />
}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|class=Sequence<br />
|name=[]<br />
|call=[block index]<br />
|returns=SequenceBlock<br />
|text=[[SequenceBlock Class|Sequence blocks]] may be easily accessed using the [] subscript and assignment operators.<br />
*block index - The index of the desired block.<br />
}} <br />
{{ClassMethod<br />
|class=Sequence<br />
|name=destroyBlock<br />
|call=destroyBlock(block)<br />
|returns=None<br />
|text=Destroy the block of parameters at the given location.<br />
*block - The index of the existing block to destroy.}}<br />
{{ClassMethod<br />
|class=Sequence<br />
|name=insertBlock<br />
|call=insertBlock(block)<br />
|returns=SequenceBlock<br />
|text=<br />
Insert a block of parameters at the given location.<br />
*block - The index of the new block to insert.<br />
Returns the newly created block.}}<br />
|empty=}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=Timecode_Class&diff=30624Timecode Class2023-12-20T17:08:32Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary<br />
|label=Timecode<br />
|summary=The Timecode class holds a timecode value. See also [[Timecode]].<br />
* <code>str</code> (Optional) - Initializes the Timecode object from a Timecode formatted String: ie. hh:mm:ss:ff or hh:mm:ss.ff <br />
* <code>fps</code> - (Keyword, Optional) Initialize the Timecode object with the specified fps. If not specified it will be initialized with the rate of the local time.<br />
* <code>hour</code> - (Keyword, Optional) Specify the hour. Should be left blank if a String arg is provided. 0 by default.<br />
* <code>minute</code> - (Keyword, Optional) Specify the minute. Should be left blank if a String arg is provided. 0 by default.<br />
* <code>second</code> - (Keyword, Optional) Specify the second. Should be left blank if a String arg is provided. 0 by default.<br />
* <code>frame</code> - (Keyword, Optional) Specify the frame. Should be left blank if a String arg is provided. 0 by default.<br />
* <code>negative</code> - (Keyword, Optional) Specify whether the Timecode is negative. Should be left blank if a String arg is provided. False by default.<br />
* <code>smpte</code> - (Keyword, Optional) Specify whether the Timecode is SMPTE standard. True by default. If the the <code>smpte</code> flag is OFF, you can break the standard and have time greater than 24 hours, negative time, and any number of frames per second above SMPTE's 60 limit.<br />
* <code>length</code> - (Keyword, Optional) Specify a custom length for the timecode. Used in conjunction with countdown. Must be greater than 0.<br />
* <code>cycle</code> - (Keyword, Optional) Specify if the timecode cycles back to the first value upon reaching the custom length. True if it cycles, False if it holds the last value (ie. length). Only used if a custom length is set. <br />
<syntaxhighlight lang=python><br />
t = tdu.Timecode() # 00:00:00:00 with fps=me.time.rate <br />
t2 = tdu.Timecode('01:11:11:15', fps=30) # 01:11:11:15 with fps=30<br />
t3 = tdu.Timecode(frame=185, fps=30) # 00:00:06:05 with fps=30<br />
t4 = tdu.Timecode(hour=1, minute=2, second=3, frame=4, negative=True, fps=30) # -01:02:03:04 with fps=30<br />
</syntaxhighlight><br />
|inherit=<br />
|parent=}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items={{ClassMember<br />
|class=tdu.Timecode<br />
|name=countdown<br />
|type=tdu.Timecode<br />
|set=0<br />
|text=Return a Timecode Object of the difference between the length and the current time. If a custom length is not specified then it will use a default: 23:59:59:ff for SMPTE and 99:59:59:ff.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=dropFrame<br />
|type=bool<br />
|set=0<br />
|text=True if the Timecode is drop-frame, False otherwise.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=fps<br />
|type=float<br />
|set=1<br />
|text=Get or set the framerate (in frames per second) of the Timecode.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=frame<br />
|type=int<br />
|set=0<br />
|text=The Timecode frame: 0 to fps-1}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=hour<br />
|type=int<br />
|set=0<br />
|text=The Timecode hour: 0 to 99 if non-SMPTE, 0 to 23 otherwise.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=minute<br />
|type=int<br />
|set=0<br />
|text=The Timecode minute: 0 to 59.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=second<br />
|type=int<br />
|set=0<br />
|text=The Timecode second: 0 to 59.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=negative<br />
|type=bool<br />
|set=1<br />
|text=True if the Timecode is negative, and False otherwise. Always False if the Timecode is following SMPTE standard.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=smpte<br />
|type=bool<br />
|set=1<br />
|text=True if the Timecode is SMPTE standard, and False otherwise. SMPTE Timecodes cannot be negative and cannot exceed 24 hours.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=text<br />
|type=string<br />
|set=0<br />
|text=Get the text format of the Timecode.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=totalFrames<br />
|type=int<br />
|set=0<br />
|text=The total number of Timecode frames, which is calculated from the hour, minute, second, frame values. Whether or not the Timecode is drop frame will also affect the value.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=totalSeconds<br />
|type=float<br />
|set=0<br />
|text=The total number of Timecode seconds, which is calculated from the hour, minute, second, frame values. Whether or not the Timecode is drop frame will also affect the value.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=cycle<br />
|type=bool<br />
|set=1<br />
|text=Get or set whether the timecode cycles. True if the Timecode cycles when the timecode value reaches the custom length (ie. specified with setLength()). If False then the timecode value will hold the last value (ie. length).}}<br />
|empty=}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items={{ClassMethod<br />
|class=tdu.Timecode<br />
|name=setComponents<br />
|call=setComponents(hour, minute, second, frame, negative=False, fps=None)<br />
|returns=None<br />
|text=Set the Timecode from individual time components.<br />
* hour - The new hour value.<br />
* minute - The new minute value.<br />
* second - The new second value.<br />
* frame - The new frame value.<br />
* negative (Keyword, Optional) - Whether the new Timecode is negative, False by default.<br />
* fps (Keyword, Optional) - The Timecode's FPS. If not specified then the FPS will not change.<br />
<syntaxhighlight lang=python><br />
n.setComponents(12, 22, 33, 45, negative=True, fps=60) -> new Timecode will be -12:22:33:45.<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=tdu.Timecode<br />
|name=setString<br />
|call=setString(timecodeStr, fps=None)<br />
|returns=None<br />
|text=<br />
Set the Timecode from a string formated as [-]hh:mm:ss:ff.<br />
* timecodeStr - The string in the format: [-]hh:mm:ss:ff.<br />
* fps (Keyword, Optional) - The Timecode's FPS. If not specified then the FPS will not change.<br />
<syntaxhighlight lang=python><br />
n.setString('01:01:00:00', fps=60)<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=tdu.Timecode<br />
|name=setTotalFrames<br />
|call=setTotalFrames(totalFrames, fps=None)<br />
|returns=None<br />
|text=Set the Timecode to a single integer value representing the new total frames.<br />
* totalFrames - The new total frame value.<br />
* fps (Keyword, Optional) - The Timecode's FPS. If not specified then the FPS will not change.<br />
<syntaxhighlight lang=python><br />
n.setTotalFrames(120, fps=60) # new Timecode will be 00:00:02:00<br />
</syntaxhighlight>}}{{ClassMethod<br />
|class=tdu.Timecode<br />
|name=setLength<br />
|call=setLength(length)<br />
|returns=None<br />
|text=<br />
Set Timecode to a custom length. Useful in conjunction with countdown.<br />
* length - The new length, either a total frame value or a Timecode Object. Must be above 0.<br />
<syntaxhighlight lang=python><br />
n.setLength(600) # sets the length to 10 seconds for a Timecode with 60 FPS.<br />
</syntaxhighlight>}}<br />
|empty=}}<br />
<section end=HELPBODY />{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=Par_Class&diff=30623Par Class2023-12-20T17:06:53Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=Par|summary=The Par class describes an instance of a single [[Parameter]]. See also [[Custom Parameters]].}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|class=Par<br />
|name=valid<br />
|type=bool<br />
|set=0<br />
|text=True if the referenced parameter currently exists, False if it has been deleted.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=val<br />
|type=value<br />
|set=1<br />
|text=Get or set the constant value of the parameter only. To get the parameter's current value, regardless of the [[Parameter Mode]] (constant, expression, export or bound), use the <syntaxhighlight lang=python inline>eval()</syntaxhighlight> method described below.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.val # the constant value <br />
op('geo1').par.tx.eval() # the evaluated parameter<br />
op('geo1').par.tx.val = 5<br />
op('geo1').par.tx = 5 # equivalent to above, more concise form<br />
op('parexec1').par.op = [parent(), parent(2)] # you can assign a list of ops to a parameter that allows multiple operators<br />
</syntaxhighlight><br />
When setting this member, the parameter will also be placed in constant mode. See mode member below.<br />
To set a menu value by its index, use the <code>menuIndex</code> member as described below.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=expr<br />
|type=str<br />
|set=1<br />
|text=Get or set the non-evaluated expression only. To get the parameter's current value, regardless of the [[Parameter Mode]] (constant, expression, export or bound), use the <syntaxhighlight lang=python inline>eval()</syntaxhighlight> method described below.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.expr = 'absTime.frame' #set to match current frame<br />
</syntaxhighlight><br />
When setting this member, the parameter will also be placed in expression mode. See mode member below.<br />
'''NOTE:''' For convenience, the expression is placed in double-quotes so you can safely put in expressions containing single quotes. 'a' and "a" have the same effect of enclosing strings in python.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=enableExpr<br />
|type=str<br />
|set=1<br />
|text=Get or set an expression that controls the enable state for this parameter.<br />
<syntaxhighlight lang=python><br />
p.enableExpr = "me.par.X.menuIndex == 5"<br />
# Note the outside quotes, as this is an expression, not an object.<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=Par<br />
|name=exportOP<br />
|type=OP or None<br />
|set=0<br />
|text=The [[OP Class|operator]] exporting to this parameter.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=exportSource<br />
|type=Cell Channel or None<br />
|set=0<br />
|text=The object exporting to this parameter. Examples: [[Cell Class|Cell]], [[Channel Class|Channel]] or None.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=bindExpr<br />
|type=expression<br />
|set=1<br />
|text=Get or set an expression that returns a Parameter object. This can be used to bind this parameter's constant value to the referenced parameter.<br />
<syntaxhighlight lang=python>p.bindExpr = "op('geo1').par.tx"</syntaxhighlight> <br />
Note the outside quotes, as bindExpr is an expression, not an object.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=bindMaster<br />
|type=OP or None<br />
|set=0<br />
|text=The object to which this parameter is bound to, possibly None.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=bindReferences<br />
|type=list<br />
|set=0<br />
|text=The (possibly empty) list of objects which bind to this parameter.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=bindRange<br />
|type=bool<br />
|set=1<br />
|text=Get or set parameter's range binding state. If True, min, max, clampMin, clampMax, normMin, normMax, normVal values will be based on master bind parameter. Can only be set on Custom Parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=hidden<br />
|type=bool<br />
|set=0<br />
|text=Get the parameter's hidden status. When True the parameter is considered obsolete or irrelevant and should not be modified. They are not shown in the dialog but only maintained for backward compatibility.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=index<br />
|type=int<br />
|set=0<br />
|text=A unique identifier for the parameter. May change in the case of custom parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=vecIndex<br />
|type=int<br />
|set=0<br />
|text=The parameter's vector index. For example, <syntaxhighlight lang=python inline>op('geo1').par.tz</syntaxhighlight> would have a value of 2.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=name<br />
|type=str<br />
|set=1<br />
|text=Get or set the parameter's unique name.<br />
<syntaxhighlight lang=python><br />
op('myOperator').par.Custompar.name = 'Translate' <br />
</syntaxhighlight><br />
Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=label<br />
|type=str<br />
|set=1<br />
|text=Get or set the parameter's label.<br />
<syntaxhighlight lang=python><br />
op('myOperator').par.Custompar.label = 'Translate' <br />
</syntaxhighlight><br />
Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=subLabel<br />
|type=str<br />
|set=0<br />
|text=Returns the name of the sub-label.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=startSection<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's separator status. When <code>True</code> a visible separator is drawn between this parameter and the ones preceding it. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=displayOnly<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's displayOnly state. Can only be set on Custom Parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=readOnly<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's read only status. When <code>True</code> the parameter cannot be modified through the UI, only scripting.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=help<br />
|type=str<br />
|set=1<br />
|text=Get or set a custom parameter's help text. To see any parameter's help, rollover the parameter while holding the Alt key. For built-in parameters this can be used to get the parameter's help text. <br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=tuplet<br />
|type=tuplet<br />
|deprecated = True<br />
|set=0<br />
|text=The tuplet of parameters this parameter belongs to. A tuplet is typically a set of parameters sharing one line on a parameter dialog, example: Translate (x, y, z).<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=tupletName<br />
|deprecated = True<br />
|type=str<br />
|set=1<br />
|text=The tuplet name of a parameter. Example: The tuplet name of a (tx,ty,tz) translate parameter is t.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=parGroup<br />
|type=tuplet<br />
|deprecated = False<br />
|set=0<br />
|text=The [[ParGroup]] of parameters this parameter belongs to. A ParGroup is a set of parameters sharing one line on a parameter dialog with a common label, example: Translate (x, y, z)..<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=min<br />
|type=value<br />
|set=1<br />
|text=Get or set the parameter's numerical minimum value. The parameter's value will be clamped at that minimum if clampMin = True. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=max<br />
|type=value<br />
|set=1<br />
|text=Get or set the parameter's numerical maximum value. The parameter's value will be clamped at that maximum if clampMax = True. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=clampMin<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's numerical clamping behavior. If set to clampMin = True, the parameter will clamp on the lower end at the value specified in min Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=clampMax<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's numerical clamping behavior. If set to clampMax = True, the parameter will clamp on the upper end at the value specified in max Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=default<br />
|type=value<br />
|set=1<br />
|text=Get or set the parameter's default value. Can only be set on [[Custom Parameters]]. Only one of default, defaultExpr can be set.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=defaultBindExpr<br />
|type=str<br />
|set=1<br />
|text=Get or set the parameter's default bind expression. Can only be set on Custom Parameters.<br />
<syntaxhighlight lang=python><br />
op('base1').par.Size.defaultBindExpr = 'me.par.tx'<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=Par<br />
|name=defaultExpr<br />
|type=str<br />
|set=1<br />
|text=Get or set the parameter's default expression. Can only be set on [[Custom Parameters]]. Only one of default, defaultExpr can be set.<br />
<syntaxhighlight lang=python><br />
# value defaults to this expression.<br />
op('base1').par.Size.defaultExpr = 'me.time.frame'<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=Par<br />
|name=defaultMode<br />
|type=ParMode<br />
|set=1<br />
|text=Get or set the parameter's default evaluation mode.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.defaultMode = ParMode.EXPRESSION<br />
</syntaxhighlight><br />
The mode is one of: ParMode.CONSTANT, ParMode.EXPRESSION, or ParMode.EXPORT, or ParMode.BIND.<br />
See [[Parameter_Dialog#Working_with_Parameter_Modes]] for more information.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=normMin<br />
|type=float<br />
|set=1<br />
|text=Get or set the parameter's minimum slider value if the parameter is a numerical slider. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=normMax<br />
|type=float<br />
|set=1<br />
|text=Get or set the parameter's maximum slider value if the parameter is a numerical slider. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=normVal<br />
|type=float<br />
|set=1<br />
|text=Get or set the parameter's value as a normalized slider position. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=enable<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's enable state. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=order<br />
|type=int<br />
|set=1<br />
|text=Get or set the parameter's position on the parameter page. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=page<br />
|type=td.Page<br />
|set=1<br />
|text=Get or set the parameter page the custom parameter is part of. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=password<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's password mode. When True all text is rendered as asterisks. Can only be set on Custom string, int or float parameters. [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=mode<br />
|type=ParMode<br />
|set=1<br />
|text=Get or set the parameter's evaluation mode.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.mode = ParMode.EXPRESSION<br />
</syntaxhighlight><br />
The mode is one of: <code>ParMode.CONSTANT</code>, <code>ParMode.EXPRESSION</code>, or <code>ParMode.EXPORT</code>, or <code>ParMode.BIND</code>.<br />
See [[Parameter_Dialog#Working_with_Parameter_Modes]] for more information.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=prevMode<br />
|type=ParMode<br />
|set=0<br />
|text=The parameter's previous evaluation mode.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=menuNames<br />
|type=list<br />
|set=1<br />
|text=Get or set a list of all possible menu choice names. In the case of non menu parameters, None is returned. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=menuLabels<br />
|type=list<br />
|set=1<br />
|text=Get or set a list of all possible menu choice labels. In the case of non menu parameters, None is returned. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=menuIndex<br />
|type=int<br />
|set=1<br />
|text=Get or set a menu constant value by its index.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=menuSource<br />
|type=str<br />
|set=1<br />
|text=Get or set an expression that returns an object with .menuItems .menuNames members. This can be used to create a custom menu whose entries dynamically follow that of another menu for example. Simple menu sources include another parameter with a menu c, an object created by [[Tdu Module|tdu.TableMenu]], or an object created by [[TDFunctions|TDFunctions.parMenu]].<br />
<syntaxhighlight lang=python><br />
p.menuSource = "op('audiodevin1').par.device"<br />
</syntaxhighlight><br />
Note the outside quotes, as menuSource is an expression, not an object.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=collapser<br />
|type=bool<br />
|set=0<br />
|text=Returns True if the parameter is a parent of collapsable parameters (ie. a collapser).}}<br />
{{ClassMember<br />
|class=Par<br />
|name=collapsable<br />
|type=bool<br />
|set=0<br />
|text=Returns True if the parameter is collapsable.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=sequence<br />
|type=Sequence | None<br />
|set=0<br />
|text=The [[Sequence Class|Sequence]] this parameter is a part of. None if not in a sequence.}}<br />
|empty=}}<br />
{{ClassMember<br />
|class=Par<br />
|name=owner<br />
|type=OP<br />
|set=0<br />
|text=The [[OP Class|OP]] to which this object belongs.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=styleCloneImmune<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's style clone immunity. When <code>False</code>, the parameter definition is matched to any matching master parameter its operator is cloned to. When <code>True</code>, it is left unchanged.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=lastScriptChange<br />
|type=tuple<br />
|set=0<br />
|text=Return information about when this parameter was last modified by a script. Cleared when the parameter is updated via the UI.<br />
<syntaxhighlight lang=python><br />
python >>> op('/level1').par.invert.lastScriptChange<br />
SetInfo(dat=type:textDAT path:/text1, function='<module>', line=1, frame=300061, timeStamp=1613150878)<br />
</syntaxhighlight><br />
}}<br />
{{SubSection|title=Type Members<br />
|text=<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isDefault<br />
|type=bool<br />
|set=0<br />
|text=True when the parameter value, expression and mode are in their default settings.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isCustom<br />
|type=bool<br />
|set=0<br />
|text=True for [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isPulse<br />
|type=bool<br />
|set=0<br />
|text=True for pulse parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isMomentary<br />
|type=bool<br />
|set=0<br />
|text=True for momentary parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isMenu<br />
|type=bool<br />
|set=0<br />
|text=True for menu parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isNumber<br />
|type=bool<br />
|set=0<br />
|text=True for numeric parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isFloat<br />
|type=bool<br />
|set=0<br />
|text=True for floating point numeric parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isInt<br />
|type=bool<br />
|set=0<br />
|text=True for integer numeric parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isOP<br />
|type=bool<br />
|set=0<br />
|text=True for OP parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isPython<br />
|type=bool<br />
|set=0<br />
|text=True for python parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isSequence<br />
|type=bool<br />
|set=0<br />
|text=True for sequence header parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isString<br />
|type=bool<br />
|set=0<br />
|text=True for string parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isToggle<br />
|type=bool<br />
|set=0<br />
|text=True for toggle parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=style<br />
|type=str<br />
|set=0<br />
|text=Describes the behavior and contents of the custom parameter. Example <code>'Float'</code>, <code>'Int'</code>, <code>'Pulse'</code>, <code>'XYZ'</code>, etc.<br />
}}<br />
{{SubSection|title=Menu Parameters<br />
|text=Menu parameters can be get or set by specifying either the string value of the menu, or its numeric index. For example, the following are equivalent:<br />
<syntaxhighlight lang=python><br />
op('geo1').par.xord = 'trs'<br />
op('geo1').par.xord = 5<br />
</syntaxhighlight><br />
Alternatively, the menu can be accessed more directly:<br />
<syntaxhighlight lang=python><br />
n = op('geo1')<br />
n.par.xord.menuIndex = 5 #trs<br />
a = n.menuNames[0] #returns 'srt'<br />
b = n.menuLabels[0] #returns 'Scale Rotate Translate'<br />
</syntaxhighlight><br />
}}}}<br />
{{ClassMethodSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|class=Par<br />
|name=copy<br />
|call=copy(Par)<br />
|returns=None<br />
|text=Copy the specified [[Par Class|parameter]].<br />
*Par - The parameter to copy.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.copy( op('geo2').par.tx )<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=eval<br />
|call=eval()<br />
|returns=value<br />
|text=Evaluate a parameter. This value may be derived by the parameter's constant value, expression, or export, dependent on its mode.<br />
<syntaxhighlight lang=python><br />
a = op('geo1').par.tx.eval()<br />
</syntaxhighlight><br />
<br />
Calling <code>eval</code> on an OP parameter that can hold multiple OPs will return a single OP if there is only 1 result, a list of OPs if there are more than 1, and None if there are no results.<br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=evalNorm<br />
|call=evalNorm()<br />
|returns=value<br />
|text=Similar to eval() but the returns the normalized slider value.<br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=evalExpression<br />
|call=evalExpression()<br />
|returns=value<br />
|text=Evaluate the expression portion of a parameter, if it contains one. This will ignore any exports, etc.<br />
<syntaxhighlight lang=python><br />
a = op('geo1').par.tx.evalExpression()<br />
</syntaxhighlight><br />
'''Note''': the results of evalExpression is always the expression's Python return value, which can be slightly different than <code>Par.eval()</code>. For example, in parameters that hold an operator, <code>.eval()</code> will always return an operator if it exists, even if the expression actually returns a string path. The evalExpression function would return the string path.<br />
<br />
To evaluate an arbitrary expression string, that is not inside a parameter, see [[OP Class|OP]].evalExpression.}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=evalExport<br />
|call=evalExport()<br />
|returns=value<br />
|text=Evaluate the export portion of a parameter, if it contains one. This will ignore any expressions, etc.<br />
<syntaxhighlight lang=python><br />
a = op('geo1').par.tx.evalExport()<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=evalOPs<br />
|call=evalOPs()<br />
|returns=list<br />
|text=Evaluate the parameter as series of operators. This is useful for a custom parameter that specifies a list of operator paths for example.<br />
<syntaxhighlight lang=python><br />
a = op('base1').par.Paths.evalOPs()<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=pulse<br />
|call=pulse(value, frames=nframes, seconds=nseconds)<br />
|returns=None<br />
|text=Pulsing sets a parameter to the specific value, cooks the operator, then restores the parameter to its previous value.<br />
For pulse type parameters no value is specified or used.<br />
*value - (Optional) The value to pulse this parameter with, default is 1.<br />
*frames - (Optional) Number of frames before restoring the parameter to its original value.<br />
*seconds - (Optional) Number of seconds before restoring the parameter to its original value.<br />
<syntaxhighlight lang=python><br />
op('moviein1').par.reload.pulse(1) #set the reload toggle, then cook<br />
op('glsl1').par.loadvariablenames.pulse() #activate the pulse parameter<br />
op('geo1').par.ty.pulse(2, frames=120) #pulse geometry ty for 120 frames<br />
op('text1').par.text.pulse('GO!', seconds=3) #pulse text TOP string field, for 3 seconds<br />
op('noise').par.type.pulse('random', seconds=0.5) #pulse noise meny type for half a second<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=destroy<br />
|call=destroy()<br />
|returns=None<br />
|text=Destroy the parameter referenced by this Par. An exception will be raised if the parameter has already been destroyed. Only custom and sequential parameters can be destroyed. Destroying a sequential parameter will destroy its entire block. Note: When any parameter is destroyed, any existing parameter objects will be invalid and should be re-fetched.<br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=reset<br />
|call=reset()<br />
|returns=bool<br />
|text=Resets the parameter to its default state.<br />
Returns true if anything was changed.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.reset()<br />
</syntaxhighlight>}}<br />
{{SubSection|title=Casting to a Value<br />
|text=The Par Class implements all necessary methods to be treated as a number or string, which in this case gets or sets its value. Therefore, an explicit call to <syntaxhighlight lang=python inline>eval()</syntaxhighlight> or <syntaxhighlight lang=python inline>set()</syntaxhighlight> is unnecessary when used in a parameter, or in a numeric expression.<br />
<br />
For example, the following are equivalent in a parameter:<br />
<br />
*<syntaxhighlight lang=python inline>(float)me.par.tx</syntaxhighlight><br />
*<syntaxhighlight lang=python inline>me.par.tx.eval()</syntaxhighlight><br />
*<syntaxhighlight lang=python inline>me.par.tx</syntaxhighlight><br />
<br />
The following are also equivalent:<br />
<br />
*<syntaxhighlight lang=python inline>me.par.tx.eval() + 1</syntaxhighlight><br />
*<syntaxhighlight lang=python inline>me.par.tx + 1</syntaxhighlight><br />
<br />
As are the following:<br />
<br />
*<syntaxhighlight lang=python inline>me.par.tx.val = 3</syntaxhighlight><br />
*<syntaxhighlight lang=python inline>me.par.tx = 3</syntaxhighlight><br />
}}}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=ParGroup_Class&diff=30622ParGroup Class2023-12-20T17:05:41Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary<br />
|label=ParGroup<br />
|summary=The ParGroup class describes an instance of a single Parameter.<br />
<br />
See also [[Custom Parameters]].<br />
|inherit=<br />
|parent=}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items={{ClassMember<br />
|class=ParGroup<br />
|name=bindExpr<br />
|type=tuple<br />
|set=1<br />
|text=Get or set expressions that return a Parameter object. This can be used to bind this parameter's constant values to the referenced parameters.<br />
<br />
Example:<br />
<syntaxhighlight lang=python>p.bindExpr = ("op('geo1').par.tx", "op('geo1').par.ty", "op('geo1').par.tz")</syntaxhighlight> <br />
Note the outside quotes, as bindExpr is an expression, not an object.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=bindMaster<br />
|type=tuple<br />
|set=0<br />
|text=The objects to which this parameter is bound to, possibly None.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=bindRange<br />
|type=bool<br />
|set=1<br />
|text=Get or set parameter's range binding state. If True, min, max, clampMin, clampMax, normMin, normMax, normVal values will be based on master bind parameter. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=bindReferences<br />
|type=tuple<br />
|set=0<br />
|text=The (possibly empty) lists of objects which bind to this parameter.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=clampMax<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical clamping behaviors. If set to <syntaxhighlight lang=python inline=true>clampMax = True</syntaxhighlight>, the parameter will clamp on the upper end at the value specified in max Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=clampMin<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical clamping behaviors. If set to <syntaxhighlight lang=python inline=true>clampMin = True</syntaxhighlight>, the parameter will clamp on the lower end at the value specified in min Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=collapsable<br />
|type=bool<br />
|set=0<br />
|text=Returns True if the parameter is collapsable.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=collapser<br />
|type=bool<br />
|set=0<br />
|text=Returns True if the parameter is a parent of collapsable parameters (ie. a collapser).}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=default<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's default values. Can only be set on Custom Parameters. Only one of default, defaultExpr can be set.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=defaultExpr<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's default expressions. Can only be set on Custom Parameters. Only one of default, defaultExpr can be set.<br />
<syntaxhighlight lang=python><br />
# value defaults to this expression.<br />
op('base1').parGroup.Size.defaultExpr = ('me.time.frame', 'me.time.frame', 'me.time.frame')<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=defaultBindExpr<br />
|type=str<br />
|set=1<br />
|text=Get or set the parameter's default bind expressions. Can only be set on Custom Parameters.<br />
<syntaxhighlight lang=python><br />
# value defaults to this expression.<br />
op('base1').parGroup.Size.defaultBindExpr = ('me.par.tx', 'me.par.ty', 'me.par.tz')<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=defaultMode<br />
|type=ParMode<br />
|set=1<br />
|text=Get or set the parameter's evaluation modes.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.defaultMode = (ParMode.EXPRESSION, ParMode.EXPRESSION, ParMode.EXPRESSION)<br />
</syntaxhighlight><br />
The modes are one of: ParMode.CONSTANT, ParMode.EXPRESSION, or ParMode.EXPORT, or ParMode.BIND.<br />
See [[Parameter_Dialog#Working_with_Parameter_Modes]] for more information.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=enable<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's enable state. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=enableExpr<br />
|type=string<br />
|set=1<br />
|text=Get or set an expression that controls the enable state for this parameter group.<br />
<syntaxhighlight lang=python><br />
p.enableExpr = "me.par.X.menuIndex == 5"<br />
</syntaxhighlight><br />
Note the outside quotes, as this is an expression, not an object.<br />
}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=exportOP<br />
|type=tuple<br />
|set=0<br />
|text=The operators exporting to this parameter.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=exportSource<br />
|type=tuple of cell, channel or None<br />
|set=0<br />
|text=The objects exporting to this parameter. Examples: Cell, Channel or None.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=expr<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the non-evaluated expressions only. To get the parameter's current values, regardless of the Parameter Mode (constant, expression, export or bound), use the eval() method described below.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.expr = ('absTime.frame', 'absTime.frame', 'absTime.frame') <br />
# set to match current frame<br />
</syntaxhighlight><br />
When setting this member, the parameter will also be placed in expression mode. See mode member below.<br />
'''NOTE:''' For convenience, the expression is placed in double-quotes so you can safely put in expressions containing single quotes. 'a' and "a" have the same effect of enclosing strings in python.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=help<br />
|type=string<br />
|set=1<br />
|text=Get or set a custom parameter's help text. To see any parameter's help, rollover the parameter while holding the Alt key.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isDefault<br />
|type=bool<br />
|set=0<br />
|text=True when the parameter value, expression and mode are in their default settings.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isCustom<br />
|type=bool<br />
|set=0<br />
|text=True for Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isFloat<br />
|type=bool<br />
|set=0<br />
|text=True for floating point numeric parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isInt<br />
|type=bool<br />
|set=0<br />
|text=True for integer numeric parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isMenu<br />
|type=bool<br />
|set=0<br />
|text=True for menu parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isMomentary<br />
|type=bool<br />
|set=0<br />
|text=True for momentary parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isNumber<br />
|type=bool<br />
|set=0<br />
|text=True for numeric parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isOP<br />
|type=bool<br />
|set=0<br />
|text=True for OP parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isPulse<br />
|type=bool<br />
|set=0<br />
|text=True for pulse parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isPython<br />
|type=bool<br />
|set=0<br />
|text=True for python parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isSequence<br />
|type=bool<br />
|set=0<br />
|text=True for sequence header parameters.<br />
}} <br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isString<br />
|type=bool<br />
|set=0<br />
|text=True for string parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isToggle<br />
|type=bool<br />
|set=0<br />
|text=True for toggle parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=label<br />
|type=string<br />
|set=1<br />
|text=Get or set the parameter's label.<br />
<syntaxhighlight lang=python><br />
op('myOperator').parGroup.Custompar.label = 'Translate'<br />
</syntaxhighlight> <br />
Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=max<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical maximum values. The parameter's values will be clamped at that maximum if <syntaxhighlight lang=python inline=true>clampMax = True</syntaxhighlight>. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuIndex<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of menu constant values by their indices.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuLabels<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of lists of all possible menu choice labels. In the case of non menu parameters, None(s) are returned. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuNames<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of lists of all possible menu choice names. In the case of non menu parameters, None(s) are returned. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuSource<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of expressions that returns objects with <code>.menuItems</code> <code>.menuNames</code> members. This can be used to create a custom menu whose entries dynamically follow that of another menu for example.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=min<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical minimum values. The parameter's values will be clamped at that minimum if <syntaxhighlight lang=python inline=true>clampMin = True</syntaxhighlight> for the particular Par. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=mode<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's evaluation modes.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.mode = (ParMode.EXPRESSION, ParMode.EXPRESSION, ParMode.EXPRESSION)<br />
</syntaxhighlight><br />
The modes are one of: <code>ParMode.CONSTANT</code>, <code>ParMode.EXPRESSION</code>, or <code>ParMode.EXPORT</code>, or <code>ParMode.BIND</code>.<br />
See [[Parameter_Dialog#Working_with_Parameter_Modes]] for more information.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=name<br />
|type=string<br />
|set=1<br />
|text=Get or set the parameter's unique name.<br />
<syntaxhighlight lang=python<br />
>op('myOperator').parGroup.Custompar.name = 'Translate'<br />
</syntaxhighlight> <br />
Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=baseName<br />
|type=string<br />
|set=1<br />
|text=Get or set the parameter's base name. This excludes any sequence prefixes, sequence indices or name suffixes. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=normMax<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's maximum slider values if the parameter is a numerical slider. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=normMin<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's minimum slider values if the parameter is a numerical slider. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=normVal<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's values as a normalized slider position. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=order<br />
|type=int<br />
|set=1<br />
|text=Get or set the parameter's position on the parameter page. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=owner<br />
|type=OP<br />
|set=0<br />
|text=The OP to which this object belongs.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=page<br />
|type=Page<br />
|set=1<br />
|text=Get or set the parameter page the custom parameter is part of. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=password<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's password mode. When True all text is rendered as asterisks. Can only be set on Custom string, int or float parameters. Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=prevMode<br />
|type=tuple<br />
|set=0<br />
|text=The parameter's previous evaluation modes.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=readOnly<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's read only status. When True the parameter cannot be modified through the UI, only scripting.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=displayOnly<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's displayOnly state. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=startSection<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's separator status. When True a visible separator is drawn between this parameter and the ones preceding it. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=style<br />
|type=string<br />
|set=0<br />
|text=Describes the behavior and contents of the custom parameter. Example 'Float', 'Int', 'Pulse', 'XYZ', etc.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=subLabel<br />
|type=tuple<br />
|set=0<br />
|text=Returns the names of the sub-label.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=val<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the constant values of the parameter only. To get the parameter's current values, regardless of the Parameter Modes (<code>constant</code>, <code>expression</code>, <code>export</code> or <code>bound</code>), use the eval() method described below.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.val # the constant values <br />
op('geo1').parGroup.t.eval() # the evaluated parameter<br />
op('geo1').parGroup.t.val = (1,2,3)<br />
op('geo1').parGroup.t = (1,2,3) #equivalent to above, more concise form<br />
</syntaxhighlight><br />
When setting this member, the parameter will also be placed in constant mode. See mode member below.<br />
To set a menu value by its index, use the menuIndex member as described below.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=valid<br />
|type=bool<br />
|set=0<br />
|text=True if the referenced parameter currently exists, False if it has been deleted.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=index<br />
|type=int<br />
|set=0<br />
|text=The parameter's order in the list.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=sequence<br />
|type=Sequence | None<br />
|set=0<br />
|text=The [[Sequence Class|Sequence]] this parGroup is a part of. None if not in a sequence.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=blockIndex<br />
|type=int | None<br />
|set=0<br />
|text=The index of the parGroup within its [[SequenceBlock Class|SequenceBlock]]. None if not in a sequence.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=sequenceIndex<br />
|type=int | None<br />
|set=0<br />
|text=The index of the parGroup's [[SequenceBlock Class|SequenceBlock]] in its [[Sequence Class|Sequence]]. None if not in a sequence.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=size<br />
|type=int<br />
|set=1<br />
|text=Get or set the parameter's vector size.}}<br />
|empty=}} <br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items={{ClassMethod<br />
|class=ParGroup<br />
|name=copy<br />
|call=copy(ParGroup)<br />
|returns=None<br />
|text=Copy the specified parameter.<br />
* ParGroup - The parameter to copy.<br />
<syntaxhighlight lang=python>op('geo1').parGroup.t.copy( op('geo2').parGroup.t )</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=destroy<br />
|call=destroy()<br />
|returns=None<br />
|text=Destroy the parameter referenced by this ParGroup. An exception will be raised if the parameter has already been destroyed. Only custom and sequential parameters can be destroyed. Destroying a sequential parameter will destroy its entire block. Note: When any parameter is destroyed, any existing parameter objects will be invalid and should be re-fetched.}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=eval<br />
|call=eval()<br />
|returns=tuple<br />
|text=Evaluate a parameter group. This value may be derived by the parameter group's constant value, expression, or export, dependent on its mode.<br />
<syntaxhighlight lang=python>a = op('geo1').parGroup.t.eval()</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalExport<br />
|call=evalExport()<br />
|returns=tuple<br />
|text=Evaluate the export portions of a parameter, if it contains any. This will ignore any expressions, etc.<br />
<syntaxhighlight lang=python>a = op('geo1').parGroup.t.evalExport()</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalExpression<br />
|call=evalExpression()<br />
|returns=tuple<br />
|text=Evaluate the expression portions of a parameter, if it contains any. This will ignore any exports, etc.<br />
<syntaxhighlight lang=python>a = op('geo1').parGroup.t.evalExpression()</syntaxhighlight><br />
To evaluate an arbitrary expression string, that is not inside a parameter, see [[OP Class#evalExpression|OP.evalExpression]].}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalNorm<br />
|call=evalNorm()<br />
|returns=tuple<br />
|text=Similar to eval() but the returns the normalized slider values.}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalOPs<br />
|call=evalOPs()<br />
|returns=tuple of lists<br />
|text=Evaluate the parameter as series of operators. This is useful for a custom parameter that specifies a list of operator paths for example.<br />
<syntaxhighlight lang=python>a = op('base1').parGroup.Paths.evalOPs()</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=pars<br />
|call=pars(pattern)<br />
|returns=list<br />
|text=Returns a (possibly empty) list of parameter objects that match the pattern.<br />
* pattern - Is a string following the Pattern Matching rules, specifying which parameters to return.<br />
<syntaxhighlight lang=python><br />
# translate parameters<br />
newlist = op('geo1').parGroup.t.pars('t?')<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=reset<br />
|call=reset()<br />
|returns=bool<br />
|text=Resets the parameter group to its default state.<br />
Returns true if anything was changed.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.reset()<br />
</syntaxhighlight><br />
}}<br />
|empty=}}<br />
<section end=HELPBODY />{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=ParGroup_Class&diff=30621ParGroup Class2023-12-20T17:04:35Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary<br />
|label=ParGroup<br />
|summary=The ParGroup class describes an instance of a single Parameter.<br />
<br />
See also [[Custom Parameters]].<br />
|inherit=<br />
|parent=}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items={{ClassMember<br />
|class=ParGroup<br />
|name=bindExpr<br />
|type=tuple<br />
|set=1<br />
|text=Get or set expressions that return a Parameter object. This can be used to bind this parameter's constant values to the referenced parameters.<br />
<br />
Example:<br />
<syntaxhighlight lang=python>p.bindExpr = ("op('geo1').par.tx", "op('geo1').par.ty", "op('geo1').par.tz")</syntaxhighlight> <br />
Note the outside quotes, as bindExpr is an expression, not an object.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=bindMaster<br />
|type=tuple<br />
|set=0<br />
|text=The objects to which this parameter is bound to, possibly None.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=bindRange<br />
|type=bool<br />
|set=1<br />
|text=Get or set parameter's range binding state. If True, min, max, clampMin, clampMax, normMin, normMax, normVal values will be based on master bind parameter. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=bindReferences<br />
|type=tuple<br />
|set=0<br />
|text=The (possibly empty) lists of objects which bind to this parameter.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=clampMax<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical clamping behaviors. If set to <syntaxhighlight lang=python inline=true>clampMax = True</syntaxhighlight>, the parameter will clamp on the upper end at the value specified in max Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=clampMin<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical clamping behaviors. If set to <syntaxhighlight lang=python inline=true>clampMin = True</syntaxhighlight>, the parameter will clamp on the lower end at the value specified in min Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=collapsable<br />
|type=bool<br />
|set=0<br />
|text=Returns True if the parameter is collapsable.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=collapser<br />
|type=bool<br />
|set=0<br />
|text=Returns True if the parameter is a parent of collapsable parameters (ie. a collapser).}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=default<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's default values. Can only be set on Custom Parameters. Only one of default, defaultExpr can be set.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=defaultExpr<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's default expressions. Can only be set on Custom Parameters. Only one of default, defaultExpr can be set.<br />
<syntaxhighlight lang=python><br />
# value defaults to this expression.<br />
op('base1').parGroup.Size.defaultExpr = ('me.time.frame', 'me.time.frame', 'me.time.frame')<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=defaultBindExpr<br />
|type=str<br />
|set=0<br />
|text=Get or set the parameter's default bind expressions. Can only be set on Custom Parameters.<br />
<syntaxhighlight lang=python><br />
# value defaults to this expression.<br />
op('base1').parGroup.Size.defaultBindExpr = ('me.par.tx', 'me.par.ty', 'me.par.tz')<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=defaultMode<br />
|type=ParMode<br />
|set=0<br />
|text=Get or set the parameter's evaluation modes.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.defaultMode = (ParMode.EXPRESSION, ParMode.EXPRESSION, ParMode.EXPRESSION)<br />
</syntaxhighlight><br />
The modes are one of: ParMode.CONSTANT, ParMode.EXPRESSION, or ParMode.EXPORT, or ParMode.BIND.<br />
See [[Parameter_Dialog#Working_with_Parameter_Modes]] for more information.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=enable<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's enable state. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=enableExpr<br />
|type=string<br />
|set=1<br />
|text=Get or set an expression that controls the enable state for this parameter group.<br />
<syntaxhighlight lang=python><br />
p.enableExpr = "me.par.X.menuIndex == 5"<br />
</syntaxhighlight><br />
Note the outside quotes, as this is an expression, not an object.<br />
}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=exportOP<br />
|type=tuple<br />
|set=0<br />
|text=The operators exporting to this parameter.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=exportSource<br />
|type=tuple of cell, channel or None<br />
|set=0<br />
|text=The objects exporting to this parameter. Examples: Cell, Channel or None.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=expr<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the non-evaluated expressions only. To get the parameter's current values, regardless of the Parameter Mode (constant, expression, export or bound), use the eval() method described below.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.expr = ('absTime.frame', 'absTime.frame', 'absTime.frame') <br />
# set to match current frame<br />
</syntaxhighlight><br />
When setting this member, the parameter will also be placed in expression mode. See mode member below.<br />
'''NOTE:''' For convenience, the expression is placed in double-quotes so you can safely put in expressions containing single quotes. 'a' and "a" have the same effect of enclosing strings in python.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=help<br />
|type=string<br />
|set=1<br />
|text=Get or set a custom parameter's help text. To see any parameter's help, rollover the parameter while holding the Alt key.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isDefault<br />
|type=bool<br />
|set=0<br />
|text=True when the parameter value, expression and mode are in their default settings.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isCustom<br />
|type=bool<br />
|set=0<br />
|text=True for Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isFloat<br />
|type=bool<br />
|set=0<br />
|text=True for floating point numeric parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isInt<br />
|type=bool<br />
|set=0<br />
|text=True for integer numeric parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isMenu<br />
|type=bool<br />
|set=0<br />
|text=True for menu parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isMomentary<br />
|type=bool<br />
|set=0<br />
|text=True for momentary parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isNumber<br />
|type=bool<br />
|set=0<br />
|text=True for numeric parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isOP<br />
|type=bool<br />
|set=0<br />
|text=True for OP parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isPulse<br />
|type=bool<br />
|set=0<br />
|text=True for pulse parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isPython<br />
|type=bool<br />
|set=0<br />
|text=True for python parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isSequence<br />
|type=bool<br />
|set=0<br />
|text=True for sequence header parameters.<br />
}} <br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isString<br />
|type=bool<br />
|set=0<br />
|text=True for string parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isToggle<br />
|type=bool<br />
|set=0<br />
|text=True for toggle parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=label<br />
|type=string<br />
|set=1<br />
|text=Get or set the parameter's label.<br />
<syntaxhighlight lang=python><br />
op('myOperator').parGroup.Custompar.label = 'Translate'<br />
</syntaxhighlight> <br />
Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=max<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical maximum values. The parameter's values will be clamped at that maximum if <syntaxhighlight lang=python inline=true>clampMax = True</syntaxhighlight>. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuIndex<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of menu constant values by their indices.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuLabels<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of lists of all possible menu choice labels. In the case of non menu parameters, None(s) are returned. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuNames<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of lists of all possible menu choice names. In the case of non menu parameters, None(s) are returned. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuSource<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of expressions that returns objects with <code>.menuItems</code> <code>.menuNames</code> members. This can be used to create a custom menu whose entries dynamically follow that of another menu for example.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=min<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical minimum values. The parameter's values will be clamped at that minimum if <syntaxhighlight lang=python inline=true>clampMin = True</syntaxhighlight> for the particular Par. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=mode<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's evaluation modes.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.mode = (ParMode.EXPRESSION, ParMode.EXPRESSION, ParMode.EXPRESSION)<br />
</syntaxhighlight><br />
The modes are one of: <code>ParMode.CONSTANT</code>, <code>ParMode.EXPRESSION</code>, or <code>ParMode.EXPORT</code>, or <code>ParMode.BIND</code>.<br />
See [[Parameter_Dialog#Working_with_Parameter_Modes]] for more information.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=name<br />
|type=string<br />
|set=1<br />
|text=Get or set the parameter's unique name.<br />
<syntaxhighlight lang=python<br />
>op('myOperator').parGroup.Custompar.name = 'Translate'<br />
</syntaxhighlight> <br />
Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=baseName<br />
|type=string<br />
|set=1<br />
|text=Get or set the parameter's base name. This excludes any sequence prefixes, sequence indices or name suffixes. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=normMax<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's maximum slider values if the parameter is a numerical slider. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=normMin<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's minimum slider values if the parameter is a numerical slider. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=normVal<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's values as a normalized slider position. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=order<br />
|type=int<br />
|set=1<br />
|text=Get or set the parameter's position on the parameter page. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=owner<br />
|type=OP<br />
|set=0<br />
|text=The OP to which this object belongs.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=page<br />
|type=Page<br />
|set=1<br />
|text=Get or set the parameter page the custom parameter is part of. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=password<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's password mode. When True all text is rendered as asterisks. Can only be set on Custom string, int or float parameters. Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=prevMode<br />
|type=tuple<br />
|set=0<br />
|text=The parameter's previous evaluation modes.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=readOnly<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's read only status. When True the parameter cannot be modified through the UI, only scripting.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=displayOnly<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's displayOnly state. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=startSection<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's separator status. When True a visible separator is drawn between this parameter and the ones preceding it. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=style<br />
|type=string<br />
|set=0<br />
|text=Describes the behavior and contents of the custom parameter. Example 'Float', 'Int', 'Pulse', 'XYZ', etc.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=subLabel<br />
|type=tuple<br />
|set=0<br />
|text=Returns the names of the sub-label.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=val<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the constant values of the parameter only. To get the parameter's current values, regardless of the Parameter Modes (<code>constant</code>, <code>expression</code>, <code>export</code> or <code>bound</code>), use the eval() method described below.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.val # the constant values <br />
op('geo1').parGroup.t.eval() # the evaluated parameter<br />
op('geo1').parGroup.t.val = (1,2,3)<br />
op('geo1').parGroup.t = (1,2,3) #equivalent to above, more concise form<br />
</syntaxhighlight><br />
When setting this member, the parameter will also be placed in constant mode. See mode member below.<br />
To set a menu value by its index, use the menuIndex member as described below.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=valid<br />
|type=bool<br />
|set=0<br />
|text=True if the referenced parameter currently exists, False if it has been deleted.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=index<br />
|type=int<br />
|set=0<br />
|text=The parameter's order in the list.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=sequence<br />
|type=Sequence | None<br />
|set=0<br />
|text=The [[Sequence Class|Sequence]] this parGroup is a part of. None if not in a sequence.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=blockIndex<br />
|type=int | None<br />
|set=0<br />
|text=The index of the parGroup within its [[SequenceBlock Class|SequenceBlock]]. None if not in a sequence.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=sequenceIndex<br />
|type=int | None<br />
|set=0<br />
|text=The index of the parGroup's [[SequenceBlock Class|SequenceBlock]] in its [[Sequence Class|Sequence]]. None if not in a sequence.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=size<br />
|type=int<br />
|set=1<br />
|text=Get or set the parameter's vector size.}}<br />
|empty=}} <br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items={{ClassMethod<br />
|class=ParGroup<br />
|name=copy<br />
|call=copy(ParGroup)<br />
|returns=None<br />
|text=Copy the specified parameter.<br />
* ParGroup - The parameter to copy.<br />
<syntaxhighlight lang=python>op('geo1').parGroup.t.copy( op('geo2').parGroup.t )</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=destroy<br />
|call=destroy()<br />
|returns=None<br />
|text=Destroy the parameter referenced by this ParGroup. An exception will be raised if the parameter has already been destroyed. Only custom and sequential parameters can be destroyed. Destroying a sequential parameter will destroy its entire block. Note: When any parameter is destroyed, any existing parameter objects will be invalid and should be re-fetched.}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=eval<br />
|call=eval()<br />
|returns=tuple<br />
|text=Evaluate a parameter group. This value may be derived by the parameter group's constant value, expression, or export, dependent on its mode.<br />
<syntaxhighlight lang=python>a = op('geo1').parGroup.t.eval()</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalExport<br />
|call=evalExport()<br />
|returns=tuple<br />
|text=Evaluate the export portions of a parameter, if it contains any. This will ignore any expressions, etc.<br />
<syntaxhighlight lang=python>a = op('geo1').parGroup.t.evalExport()</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalExpression<br />
|call=evalExpression()<br />
|returns=tuple<br />
|text=Evaluate the expression portions of a parameter, if it contains any. This will ignore any exports, etc.<br />
<syntaxhighlight lang=python>a = op('geo1').parGroup.t.evalExpression()</syntaxhighlight><br />
To evaluate an arbitrary expression string, that is not inside a parameter, see [[OP Class#evalExpression|OP.evalExpression]].}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalNorm<br />
|call=evalNorm()<br />
|returns=tuple<br />
|text=Similar to eval() but the returns the normalized slider values.}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalOPs<br />
|call=evalOPs()<br />
|returns=tuple of lists<br />
|text=Evaluate the parameter as series of operators. This is useful for a custom parameter that specifies a list of operator paths for example.<br />
<syntaxhighlight lang=python>a = op('base1').parGroup.Paths.evalOPs()</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=pars<br />
|call=pars(pattern)<br />
|returns=list<br />
|text=Returns a (possibly empty) list of parameter objects that match the pattern.<br />
* pattern - Is a string following the Pattern Matching rules, specifying which parameters to return.<br />
<syntaxhighlight lang=python><br />
# translate parameters<br />
newlist = op('geo1').parGroup.t.pars('t?')<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=reset<br />
|call=reset()<br />
|returns=bool<br />
|text=Resets the parameter group to its default state.<br />
Returns true if anything was changed.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.reset()<br />
</syntaxhighlight><br />
}}<br />
|empty=}}<br />
<section end=HELPBODY />{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=ParGroup_Class&diff=30620ParGroup Class2023-12-20T17:02:26Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary<br />
|label=ParGroup<br />
|summary=The ParGroup class describes an instance of a single Parameter.<br />
<br />
See also [[Custom Parameters]].<br />
|inherit=<br />
|parent=}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items={{ClassMember<br />
|class=ParGroup<br />
|name=bindExpr<br />
|type=tuple<br />
|set=1<br />
|text=Get or set expressions that return a Parameter object. This can be used to bind this parameter's constant values to the referenced parameters.<br />
<br />
Example:<br />
<syntaxhighlight lang=python>p.bindExpr = ("op('geo1').par.tx", "op('geo1').par.ty", "op('geo1').par.tz")</syntaxhighlight> <br />
Note the outside quotes, as bindExpr is an expression, not an object.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=bindMaster<br />
|type=tuple<br />
|set=0<br />
|text=The objects to which this parameter is bound to, possibly None.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=bindRange<br />
|type=bool<br />
|set=1<br />
|text=Get or set parameter's range binding state. If True, min, max, clampMin, clampMax, normMin, normMax, normVal values will be based on master bind parameter. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=bindReferences<br />
|type=tuple<br />
|set=0<br />
|text=The (possibly empty) lists of objects which bind to this parameter.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=clampMax<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical clamping behaviors. If set to <syntaxhighlight lang=python inline=true>clampMax = True</syntaxhighlight>, the parameter will clamp on the upper end at the value specified in max Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=clampMin<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical clamping behaviors. If set to <syntaxhighlight lang=python inline=true>clampMin = True</syntaxhighlight>, the parameter will clamp on the lower end at the value specified in min Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=collapsable<br />
|type=bool<br />
|set=0<br />
|text=Returns True if the parameter is collapsable.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=collapser<br />
|type=bool<br />
|set=0<br />
|text=Returns True if the parameter is a parent of collapsable parameters (ie. a collapser).}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=default<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's default values. Can only be set on Custom Parameters. Only one of default, defaultExpr can be set.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=defaultExpr<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's default expressions. Can only be set on Custom Parameters. Only one of default, defaultExpr can be set.<br />
<syntaxhighlight lang=python><br />
# value defaults to this expression.<br />
op('base1').parGroup.Size.defaultExpr = ('me.time.frame', 'me.time.frame', 'me.time.frame')<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=defaultBindExpr<br />
|type=str<br />
|set=0<br />
|text=Get or set the parameter's default bind expressions. Can only be set on Custom Parameters.<br />
<syntaxhighlight lang=python><br />
# value defaults to this expression.<br />
op('base1').parGroup.Size.defaultBindExpr = ('me.par.tx', 'me.par.ty', 'me.par.tz')<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=defaultMode<br />
|type=ParMode<br />
|set=0<br />
|text=Get or set the parameter's evaluation modes.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.defaultMode = (ParMode.EXPRESSION, ParMode.EXPRESSION, ParMode.EXPRESSION)<br />
</syntaxhighlight><br />
The modes are one of: ParMode.CONSTANT, ParMode.EXPRESSION, or ParMode.EXPORT, or ParMode.BIND.<br />
See [[Parameter_Dialog#Working_with_Parameter_Modes]] for more information.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=enable<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's enable state. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=enableExpr<br />
|type=string<br />
|set=1<br />
|text=Get or set an expression that controls the enable state for this parameter group.<br />
<syntaxhighlight lang=python><br />
p.enableExpr = "me.par.X.menuIndex == 5"<br />
</syntaxhighlight><br />
Note the outside quotes, as this is an expression, not an object.<br />
}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=exportOP<br />
|type=tuple<br />
|set=0<br />
|text=The operators exporting to this parameter.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=exportSource<br />
|type=tuple of cell, channel or None<br />
|set=0<br />
|text=The objects exporting to this parameter. Examples: Cell, Channel or None.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=expr<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the non-evaluated expressions only. To get the parameter's current values, regardless of the Parameter Mode (constant, expression, export or bound), use the eval() method described below.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.expr = ('absTime.frame', 'absTime.frame', 'absTime.frame') <br />
# set to match current frame<br />
</syntaxhighlight><br />
When setting this member, the parameter will also be placed in expression mode. See mode member below.<br />
'''NOTE:''' For convenience, the expression is placed in double-quotes so you can safely put in expressions containing single quotes. 'a' and "a" have the same effect of enclosing strings in python.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=help<br />
|type=string<br />
|set=1<br />
|text=Get or set a custom parameter's help text. To see any parameter's help, rollover the parameter while holding the Alt key.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isDefault<br />
|type=bool<br />
|set=0<br />
|text=True when the parameter value, expression and mode are in their default settings.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isCustom<br />
|type=bool<br />
|set=0<br />
|text=True for Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isFloat<br />
|type=bool<br />
|set=0<br />
|text=True for floating point numeric parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isInt<br />
|type=bool<br />
|set=0<br />
|text=True for integer numeric parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isMenu<br />
|type=bool<br />
|set=0<br />
|text=True for menu parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isMomentary<br />
|type=bool<br />
|set=0<br />
|text=True for momentary parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isNumber<br />
|type=bool<br />
|set=0<br />
|text=True for numeric parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isOP<br />
|type=bool<br />
|set=0<br />
|text=True for OP parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isPulse<br />
|type=bool<br />
|set=0<br />
|text=True for pulse parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isPython<br />
|type=bool<br />
|set=0<br />
|text=True for python parameters.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isSequence<br />
|type=bool<br />
|set=0<br />
|text=True for sequence header parameters.<br />
}} <br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isString<br />
|type=bool<br />
|set=0<br />
|text=True for string parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=isToggle<br />
|type=bool<br />
|set=0<br />
|text=True for toggle parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=label<br />
|type=string<br />
|set=1<br />
|text=Get or set the parameter's label.<br />
<syntaxhighlight lang=python><br />
op('myOperator').parGroup.Custompar.label = 'Translate'<br />
</syntaxhighlight> <br />
Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=max<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical maximum values. The parameter's values will be clamped at that maximum if <syntaxhighlight lang=python inline=true>clampMax = True</syntaxhighlight>. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuIndex<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of menu constant values by their indices.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuLabels<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of lists of all possible menu choice labels. In the case of non menu parameters, None(s) are returned. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuNames<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of lists of all possible menu choice names. In the case of non menu parameters, None(s) are returned. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=menuSource<br />
|type=tuple<br />
|set=1<br />
|text=Get or set a tuple of expressions that returns objects with <code>.menuItems</code> <code>.menuNames</code> members. This can be used to create a custom menu whose entries dynamically follow that of another menu for example.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=min<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's numerical minimum values. The parameter's values will be clamped at that minimum if <syntaxhighlight lang=python inline=true>clampMin = True</syntaxhighlight> for the particular Par. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=mode<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's evaluation modes.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.mode = (ParMode.EXPRESSION, ParMode.EXPRESSION, ParMode.EXPRESSION)<br />
</syntaxhighlight><br />
The modes are one of: <code>ParMode.CONSTANT</code>, <code>ParMode.EXPRESSION</code>, or <code>ParMode.EXPORT</code>, or <code>ParMode.BIND</code>.<br />
See [[Parameter_Dialog#Working_with_Parameter_Modes]] for more information.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=name<br />
|type=string<br />
|set=1<br />
|text=Get or set the parameter's unique name.<br />
<syntaxhighlight lang=python<br />
>op('myOperator').parGroup.Custompar.name = 'Translate'<br />
</syntaxhighlight> <br />
Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=baseName<br />
|type=string<br />
|set=1<br />
|text=Get or set the parameter's base name. This excludes any sequence prefixes, sequence indices or name suffixes. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=normMax<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's maximum slider values if the parameter is a numerical slider. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=normMin<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's minimum slider values if the parameter is a numerical slider. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=normVal<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the parameter's values as a normalized slider position. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=order<br />
|type=int<br />
|set=1<br />
|text=Get or set the parameter's position on the parameter page. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=owner<br />
|type=OP<br />
|set=0<br />
|text=The OP to which this object belongs.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=page<br />
|type=Page<br />
|set=1<br />
|text=Get or set the parameter page the custom parameter is part of. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=password<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's password mode. When True all text is rendered as asterisks. Can only be set on Custom string, int or float parameters. Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=prevMode<br />
|type=tuple<br />
|set=0<br />
|text=The parameter's previous evaluation modes.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=readOnly<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's read only status. When True the parameter cannot be modified through the UI, only scripting.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=displayOnly<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's displayOnly state. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=startSection<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's separator status. When True a visible separator is drawn between this parameter and the ones preceding it. Can only be set on Custom Parameters.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=style<br />
|type=string<br />
|set=0<br />
|text=Describes the behavior and contents of the custom parameter. Example 'Float', 'Int', 'Pulse', 'XYZ', etc.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=subLabel<br />
|type=tuple<br />
|set=0<br />
|text=Returns the names of the sub-label.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=val<br />
|type=tuple<br />
|set=1<br />
|text=Get or set the constant values of the parameter only. To get the parameter's current values, regardless of the Parameter Modes (<code>constant</code>, <code>expression</code>, <code>export</code> or <code>bound</code>), use the eval() method described below.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.val # the constant values <br />
op('geo1').parGroup.t.eval() # the evaluated parameter<br />
op('geo1').parGroup.t.val = (1,2,3)<br />
op('geo1').parGroup.t = (1,2,3) #equivalent to above, more concise form<br />
</syntaxhighlight><br />
When setting this member, the parameter will also be placed in constant mode. See mode member below.<br />
To set a menu value by its index, use the menuIndex member as described below.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=valid<br />
|type=bool<br />
|set=0<br />
|text=True if the referenced parameter currently exists, False if it has been deleted.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=index<br />
|type=int<br />
|set=0<br />
|text=The parameter's order in the list.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=sequence<br />
|type=Sequence | None<br />
|set=0<br />
|text=The [[Sequence Class|Sequence]] this parGroup is a part of. None if not in a sequence.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=blockIndex<br />
|type=int | None<br />
|set=0<br />
|text=The index of the parGroup within its [[SequenceBlock Class|SequenceBlock]]. None if not in a sequence.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=sequenceIndex<br />
|type=int | None<br />
|set=0<br />
|text=The index of the parGroup's [[SequenceBlock Class|SequenceBlock]] in its [[Sequence Class|Sequence]]. None if not in a sequence.}}<br />
{{ClassMember<br />
|class=ParGroup<br />
|name=size<br />
|type=int<br />
|set=1<br />
|text=Get or set the parameter's vector size.}}<br />
|empty=}} <br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items={{ClassMethod<br />
|class=ParGroup<br />
|name=copy<br />
|call=copy(ParGroup)<br />
|returns=None<br />
|text=Copy the specified parameter.<br />
* ParGroup - The parameter to copy.<br />
<syntaxhighlight lang=python>op('geo1').parGroup.t.copy( op('geo2').parGroup.t )</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=destroy<br />
|call=destroy()<br />
|returns=None<br />
|text=Destroy the parameter referenced by this ParGroup. An exception will be raised if the parameter has already been destroyed. Only custom and sequential parameters can be destroyed. Destroying a sequential parameter will destroy its entire block. Note: When any parameter is destroyed, any existing parameter objects will be invalid and should be re-fetched.}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=eval<br />
|call=eval()<br />
|returns=tuple<br />
|text=Evaluate a parameter group. This value may be derived by the parameter group's constant value, expression, or export, dependent on its mode.<br />
<syntaxhighlight lang=python>a = op('geo1').parGroup.t.eval()</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalExport<br />
|call=evalExport()<br />
|returns=tuple<br />
|text=Evaluate the export portions of a parameter, if it contains any. This will ignore any expressions, etc.<br />
<syntaxhighlight lang=python>a = op('geo1').parGroup.t.evalExport()</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalExpression<br />
|call=evalExpression()<br />
|returns=tuple<br />
|text=Evaluate the expression portions of a parameter, if it contains any. This will ignore any exports, etc.<br />
<syntaxhighlight lang=python>a = op('geo1').parGroup.t.evalExpression()</syntaxhighlight><br />
To evaluate an arbitrary expression string, that is not inside a parameter, see [[OP Class#evalExpression|OP.evalExpression]].}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalNorm<br />
|call=evalNorm()<br />
|returns=tuple<br />
|text=Similar to eval() but the returns the normalized slider values.}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=evalOPs<br />
|call=evalOPs()<br />
|returns=tuple of lists<br />
|text=Evaluate the parameter as series of operators. This is useful for a custom parameter that specifies a list of operator paths for example.<br />
<syntaxhighlight lang=python>a = op('base1').parGroup.Paths.evalOPs()</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=pars<br />
|call=pars(pattern)<br />
|returns=list<br />
|text=Returns a (possibly empty) list of parameter objects that match the pattern.<br />
* pattern - Is a string following the Pattern Matching rules, specifying which parameters to return.<br />
<syntaxhighlight lang=python><br />
# translate parameters<br />
newlist = op('geo1').parGroup.t.pars('t?')<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=ParGroup<br />
|name=reset<br />
|call=reset()<br />
|returns=bool<br />
|text=Resets the parameter group to its default state.<br />
Returns true if anything was changed.<br />
<syntaxhighlight lang=python><br />
op('geo1').parGroup.t.reset()<br />
</syntaxhighlight><br />
}}<br />
|empty=}}<br />
<section end=HELPBODY />{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=Timecode_Class&diff=30619Timecode Class2023-12-20T16:48:17Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary<br />
|label=Timecode<br />
|summary=The Timecode class holds a timecode value. See also [[Timecode]].<br />
* <code>str</code> (Optional) - Initializes the Timecode object from a Timecode formatted String: ie. hh:mm:ss:ff or hh:mm:ss.ff <br />
* <code>fps</code> - (Keyword, Optional) Initialize the Timecode object with the specified fps. If not specified it will be initialized with the rate of the local time.<br />
* <code>hour</code> - (Keyword, Optional) Specify the hour. Should be left blank if a String arg is provided. 0 by default.<br />
* <code>minute</code> - (Keyword, Optional) Specify the minute. Should be left blank if a String arg is provided. 0 by default.<br />
* <code>second</code> - (Keyword, Optional) Specify the second. Should be left blank if a String arg is provided. 0 by default.<br />
* <code>frame</code> - (Keyword, Optional) Specify the frame. Should be left blank if a String arg is provided. 0 by default.<br />
* <code>negative</code> - (Keyword, Optional) Specify whether the Timecode is negative. Should be left blank if a String arg is provided. False by default.<br />
* <code>smpte</code> - (Keyword, Optional) Specify whether the Timecode is SMPTE standard. True by default. If the the <code>smpte</code> flag is OFF, you can break the standard and have time greater than 24 hours, negative time, and any number of frames per second above SMPTE's 60 limit.<br />
* <code>length</code> - (Keyword, Optional) Specify a custom length for the timecode. Used in conjunction with countdown. Must be greater than 0.<br />
* <code>cycle</code> - (Keyword, Optional) Specify if the timecode cycles back to the first value upon reaching the custom length. True if it cycles, False if it holds the last value (ie. length). Only used if a custom length is set. <br />
<syntaxhighlight lang=python><br />
t = tdu.Timecode() # 00:00:00:00 with fps=me.time.rate <br />
t2 = tdu.Timecode('01:11:11:15', fps=30) # 01:11:11:15 with fps=30<br />
t3 = tdu.Timecode(frame=185, fps=30) # 00:00:06:05 with fps=30<br />
t4 = tdu.Timecode(hour=1, minute=2, second=3, frame=4, negative=True, fps=30) # -01:02:03:04 with fps=30<br />
</syntaxhighlight><br />
|inherit=<br />
|parent=}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items={{ClassMember<br />
|class=tdu.Timecode<br />
|name=countdown<br />
|type=tdu.Timecode<br />
|set=0<br />
|text=Return a Timecode Object of the difference between the length and the current time. If a custom length is not specified then it will use a default: 23:59:59:ff for SMPTE and 99:59:59:ff.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=dropFrame<br />
|type=bool<br />
|set=0<br />
|text=True if the Timecode is drop-frame, False otherwise.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=fps<br />
|type=float<br />
|set=0<br />
|text=Get or set the framerate (in frames per second) of the Timecode.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=frame<br />
|type=int<br />
|set=0<br />
|text=The Timecode frame: 0 to fps-1}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=hour<br />
|type=int<br />
|set=0<br />
|text=The Timecode hour: 0 to 99 if non-SMPTE, 0 to 23 otherwise.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=minute<br />
|type=int<br />
|set=0<br />
|text=The Timecode minute: 0 to 59.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=second<br />
|type=int<br />
|set=0<br />
|text=The Timecode second: 0 to 59.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=negative<br />
|type=bool<br />
|set=0<br />
|text=True if the Timecode is negative, and False otherwise. Always False if the Timecode is following SMPTE standard.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=smpte<br />
|type=bool<br />
|set=0<br />
|text=True if the Timecode is SMPTE standard, and False otherwise. SMPTE Timecodes cannot be negative and cannot exceed 24 hours.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=text<br />
|type=string<br />
|set=0<br />
|text=Get the text format of the Timecode.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=totalFrames<br />
|type=int<br />
|set=0<br />
|text=The total number of Timecode frames, which is calculated from the hour, minute, second, frame values. Whether or not the Timecode is drop frame will also affect the value.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=totalSeconds<br />
|type=float<br />
|set=0<br />
|text=The total number of Timecode seconds, which is calculated from the hour, minute, second, frame values. Whether or not the Timecode is drop frame will also affect the value.}}<br />
{{ClassMember<br />
|class=tdu.Timecode<br />
|name=cycle<br />
|type=bool<br />
|set=1<br />
|text=Get or set whether the timecode cycles. True if the Timecode cycles when the timecode value reaches the custom length (ie. specified with setLength()). If False then the timecode value will hold the last value (ie. length).}}<br />
|empty=}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items={{ClassMethod<br />
|class=tdu.Timecode<br />
|name=setComponents<br />
|call=setComponents(hour, minute, second, frame, negative=False, fps=None)<br />
|returns=None<br />
|text=Set the Timecode from individual time components.<br />
* hour - The new hour value.<br />
* minute - The new minute value.<br />
* second - The new second value.<br />
* frame - The new frame value.<br />
* negative (Keyword, Optional) - Whether the new Timecode is negative, False by default.<br />
* fps (Keyword, Optional) - The Timecode's FPS. If not specified then the FPS will not change.<br />
<syntaxhighlight lang=python><br />
n.setComponents(12, 22, 33, 45, negative=True, fps=60) -> new Timecode will be -12:22:33:45.<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=tdu.Timecode<br />
|name=setString<br />
|call=setString(timecodeStr, fps=None)<br />
|returns=None<br />
|text=<br />
Set the Timecode from a string formated as [-]hh:mm:ss:ff.<br />
* timecodeStr - The string in the format: [-]hh:mm:ss:ff.<br />
* fps (Keyword, Optional) - The Timecode's FPS. If not specified then the FPS will not change.<br />
<syntaxhighlight lang=python><br />
n.setString('01:01:00:00', fps=60)<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=tdu.Timecode<br />
|name=setTotalFrames<br />
|call=setTotalFrames(totalFrames, fps=None)<br />
|returns=None<br />
|text=Set the Timecode to a single integer value representing the new total frames.<br />
* totalFrames - The new total frame value.<br />
* fps (Keyword, Optional) - The Timecode's FPS. If not specified then the FPS will not change.<br />
<syntaxhighlight lang=python><br />
n.setTotalFrames(120, fps=60) # new Timecode will be 00:00:02:00<br />
</syntaxhighlight>}}{{ClassMethod<br />
|class=tdu.Timecode<br />
|name=setLength<br />
|call=setLength(length)<br />
|returns=None<br />
|text=<br />
Set Timecode to a custom length. Useful in conjunction with countdown.<br />
* length - The new length, either a total frame value or a Timecode Object. Must be above 0.<br />
<syntaxhighlight lang=python><br />
n.setLength(600) # sets the length to 10 seconds for a Timecode with 60 FPS.<br />
</syntaxhighlight>}}<br />
|empty=}}<br />
<section end=HELPBODY />{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=Par_Class&diff=30618Par Class2023-12-20T16:32:59Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=Par|summary=The Par class describes an instance of a single [[Parameter]]. See also [[Custom Parameters]].}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|class=Par<br />
|name=valid<br />
|type=bool<br />
|set=0<br />
|text=True if the referenced parameter currently exists, False if it has been deleted.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=val<br />
|type=value<br />
|set=1<br />
|text=Get or set the constant value of the parameter only. To get the parameter's current value, regardless of the [[Parameter Mode]] (constant, expression, export or bound), use the <syntaxhighlight lang=python inline>eval()</syntaxhighlight> method described below.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.val # the constant value <br />
op('geo1').par.tx.eval() # the evaluated parameter<br />
op('geo1').par.tx.val = 5<br />
op('geo1').par.tx = 5 # equivalent to above, more concise form<br />
op('parexec1').par.op = [parent(), parent(2)] # you can assign a list of ops to a parameter that allows multiple operators<br />
</syntaxhighlight><br />
When setting this member, the parameter will also be placed in constant mode. See mode member below.<br />
To set a menu value by its index, use the <code>menuIndex</code> member as described below.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=expr<br />
|type=str<br />
|set=1<br />
|text=Get or set the non-evaluated expression only. To get the parameter's current value, regardless of the [[Parameter Mode]] (constant, expression, export or bound), use the <syntaxhighlight lang=python inline>eval()</syntaxhighlight> method described below.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.expr = 'absTime.frame' #set to match current frame<br />
</syntaxhighlight><br />
When setting this member, the parameter will also be placed in expression mode. See mode member below.<br />
'''NOTE:''' For convenience, the expression is placed in double-quotes so you can safely put in expressions containing single quotes. 'a' and "a" have the same effect of enclosing strings in python.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=enableExpr<br />
|type=str<br />
|set=1<br />
|text=Get or set an expression that controls the enable state for this parameter.<br />
<syntaxhighlight lang=python><br />
p.enableExpr = "me.par.X.menuIndex == 5"<br />
# Note the outside quotes, as this is an expression, not an object.<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=Par<br />
|name=exportOP<br />
|type=OP or None<br />
|set=0<br />
|text=The [[OP Class|operator]] exporting to this parameter.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=exportSource<br />
|type=Cell Channel or None<br />
|set=0<br />
|text=The object exporting to this parameter. Examples: [[Cell Class|Cell]], [[Channel Class|Channel]] or None.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=bindExpr<br />
|type=expression<br />
|set=1<br />
|text=Get or set an expression that returns a Parameter object. This can be used to bind this parameter's constant value to the referenced parameter.<br />
<syntaxhighlight lang=python>p.bindExpr = "op('geo1').par.tx"</syntaxhighlight> <br />
Note the outside quotes, as bindExpr is an expression, not an object.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=bindMaster<br />
|type=OP or None<br />
|set=0<br />
|text=The object to which this parameter is bound to, possibly None.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=bindReferences<br />
|type=list<br />
|set=0<br />
|text=The (possibly empty) list of objects which bind to this parameter.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=bindRange<br />
|type=bool<br />
|set=1<br />
|text=Get or set parameter's range binding state. If True, min, max, clampMin, clampMax, normMin, normMax, normVal values will be based on master bind parameter. Can only be set on Custom Parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=hidden<br />
|type=bool<br />
|set=0<br />
|text=Get the parameter's hidden status. When True the parameter is considered obsolete or irrelevant and should not be modified. They are not shown in the dialog but only maintained for backward compatibility.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=index<br />
|type=int<br />
|set=0<br />
|text=A unique identifier for the parameter. May change in the case of custom parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=vecIndex<br />
|type=int<br />
|set=0<br />
|text=The parameter's vector index. For example, <syntaxhighlight lang=python inline>op('geo1').par.tz</syntaxhighlight> would have a value of 2.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=name<br />
|type=str<br />
|set=1<br />
|text=Get or set the parameter's unique name.<br />
<syntaxhighlight lang=python><br />
op('myOperator').par.Custompar.name = 'Translate' <br />
</syntaxhighlight><br />
Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=label<br />
|type=str<br />
|set=1<br />
|text=Get or set the parameter's label.<br />
<syntaxhighlight lang=python><br />
op('myOperator').par.Custompar.label = 'Translate' <br />
</syntaxhighlight><br />
Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=subLabel<br />
|type=str<br />
|set=0<br />
|text=Returns the name of the sub-label.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=startSection<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's separator status. When <code>True</code> a visible separator is drawn between this parameter and the ones preceding it. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=displayOnly<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's displayOnly state. Can only be set on Custom Parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=readOnly<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's read only status. When <code>True</code> the parameter cannot be modified through the UI, only scripting.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=help<br />
|type=str<br />
|set=1<br />
|text=Get or set a custom parameter's help text. To see any parameter's help, rollover the parameter while holding the Alt key. For built-in parameters this can be used to get the parameter's help text. <br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=tuplet<br />
|type=tuplet<br />
|deprecated = True<br />
|set=0<br />
|text=The tuplet of parameters this parameter belongs to. A tuplet is typically a set of parameters sharing one line on a parameter dialog, example: Translate (x, y, z).<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=tupletName<br />
|deprecated = True<br />
|type=str<br />
|set=1<br />
|text=The tuplet name of a parameter. Example: The tuplet name of a (tx,ty,tz) translate parameter is t.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=parGroup<br />
|type=tuplet<br />
|deprecated = False<br />
|set=0<br />
|text=The [[ParGroup]] of parameters this parameter belongs to. A ParGroup is a set of parameters sharing one line on a parameter dialog with a common label, example: Translate (x, y, z)..<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=min<br />
|type=value<br />
|set=1<br />
|text=Get or set the parameter's numerical minimum value. The parameter's value will be clamped at that minimum if clampMin = True. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=max<br />
|type=value<br />
|set=1<br />
|text=Get or set the parameter's numerical maximum value. The parameter's value will be clamped at that maximum if clampMax = True. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=clampMin<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's numerical clamping behavior. If set to clampMin = True, the parameter will clamp on the lower end at the value specified in min Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=clampMax<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's numerical clamping behavior. If set to clampMax = True, the parameter will clamp on the upper end at the value specified in max Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=default<br />
|type=value<br />
|set=1<br />
|text=Get or set the parameter's default value. Can only be set on [[Custom Parameters]]. Only one of default, defaultExpr can be set.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=defaultBindExpr<br />
|type=str<br />
|set=0<br />
|text=Get or set the parameter's default bind expression. Can only be set on Custom Parameters.<br />
<syntaxhighlight lang=python><br />
op('base1').par.Size.defaultBindExpr = 'me.par.tx'<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=Par<br />
|name=defaultExpr<br />
|type=str<br />
|set=1<br />
|text=Get or set the parameter's default expression. Can only be set on [[Custom Parameters]]. Only one of default, defaultExpr can be set.<br />
<syntaxhighlight lang=python><br />
# value defaults to this expression.<br />
op('base1').par.Size.defaultExpr = 'me.time.frame'<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=Par<br />
|name=defaultMode<br />
|type=ParMode<br />
|set=0<br />
|text=Get or set the parameter's default evaluation mode.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.defaultMode = ParMode.EXPRESSION<br />
</syntaxhighlight><br />
The mode is one of: ParMode.CONSTANT, ParMode.EXPRESSION, or ParMode.EXPORT, or ParMode.BIND.<br />
See [[Parameter_Dialog#Working_with_Parameter_Modes]] for more information.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=normMin<br />
|type=float<br />
|set=1<br />
|text=Get or set the parameter's minimum slider value if the parameter is a numerical slider. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=normMax<br />
|type=float<br />
|set=1<br />
|text=Get or set the parameter's maximum slider value if the parameter is a numerical slider. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=normVal<br />
|type=float<br />
|set=1<br />
|text=Get or set the parameter's value as a normalized slider position. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=enable<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's enable state. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=order<br />
|type=int<br />
|set=1<br />
|text=Get or set the parameter's position on the parameter page. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=page<br />
|type=td.Page<br />
|set=1<br />
|text=Get or set the parameter page the custom parameter is part of. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=password<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's password mode. When True all text is rendered as asterisks. Can only be set on Custom string, int or float parameters. [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=mode<br />
|type=ParMode<br />
|set=1<br />
|text=Get or set the parameter's evaluation mode.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.mode = ParMode.EXPRESSION<br />
</syntaxhighlight><br />
The mode is one of: <code>ParMode.CONSTANT</code>, <code>ParMode.EXPRESSION</code>, or <code>ParMode.EXPORT</code>, or <code>ParMode.BIND</code>.<br />
See [[Parameter_Dialog#Working_with_Parameter_Modes]] for more information.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=prevMode<br />
|type=ParMode<br />
|set=0<br />
|text=The parameter's previous evaluation mode.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=menuNames<br />
|type=list<br />
|set=1<br />
|text=Get or set a list of all possible menu choice names. In the case of non menu parameters, None is returned. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=menuLabels<br />
|type=list<br />
|set=1<br />
|text=Get or set a list of all possible menu choice labels. In the case of non menu parameters, None is returned. Can only be set on [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=menuIndex<br />
|type=int<br />
|set=1<br />
|text=Get or set a menu constant value by its index.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=menuSource<br />
|type=str<br />
|set=1<br />
|text=Get or set an expression that returns an object with .menuItems .menuNames members. This can be used to create a custom menu whose entries dynamically follow that of another menu for example. Simple menu sources include another parameter with a menu c, an object created by [[Tdu Module|tdu.TableMenu]], or an object created by [[TDFunctions|TDFunctions.parMenu]].<br />
<syntaxhighlight lang=python><br />
p.menuSource = "op('audiodevin1').par.device"<br />
</syntaxhighlight><br />
Note the outside quotes, as menuSource is an expression, not an object.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=collapser<br />
|type=bool<br />
|set=0<br />
|text=Returns True if the parameter is a parent of collapsable parameters (ie. a collapser).}}<br />
{{ClassMember<br />
|class=Par<br />
|name=collapsable<br />
|type=bool<br />
|set=0<br />
|text=Returns True if the parameter is collapsable.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=sequence<br />
|type=Sequence | None<br />
|set=0<br />
|text=The [[Sequence Class|Sequence]] this parameter is a part of. None if not in a sequence.}}<br />
|empty=}}<br />
{{ClassMember<br />
|class=Par<br />
|name=owner<br />
|type=OP<br />
|set=0<br />
|text=The [[OP Class|OP]] to which this object belongs.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=styleCloneImmune<br />
|type=bool<br />
|set=1<br />
|text=Get or set the parameter's style clone immunity. When <code>False</code>, the parameter definition is matched to any matching master parameter its operator is cloned to. When <code>True</code>, it is left unchanged.}}<br />
{{ClassMember<br />
|class=Par<br />
|name=lastScriptChange<br />
|type=tuple<br />
|set=0<br />
|text=Return information about when this parameter was last modified by a script. Cleared when the parameter is updated via the UI.<br />
<syntaxhighlight lang=python><br />
python >>> op('/level1').par.invert.lastScriptChange<br />
SetInfo(dat=type:textDAT path:/text1, function='<module>', line=1, frame=300061, timeStamp=1613150878)<br />
</syntaxhighlight><br />
}}<br />
{{SubSection|title=Type Members<br />
|text=<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isDefault<br />
|type=bool<br />
|set=0<br />
|text=True when the parameter value, expression and mode are in their default settings.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isCustom<br />
|type=bool<br />
|set=0<br />
|text=True for [[Custom Parameters]].}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isPulse<br />
|type=bool<br />
|set=0<br />
|text=True for pulse parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isMomentary<br />
|type=bool<br />
|set=0<br />
|text=True for momentary parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isMenu<br />
|type=bool<br />
|set=0<br />
|text=True for menu parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isNumber<br />
|type=bool<br />
|set=0<br />
|text=True for numeric parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isFloat<br />
|type=bool<br />
|set=0<br />
|text=True for floating point numeric parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isInt<br />
|type=bool<br />
|set=0<br />
|text=True for integer numeric parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isOP<br />
|type=bool<br />
|set=0<br />
|text=True for OP parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isPython<br />
|type=bool<br />
|set=0<br />
|text=True for python parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isSequence<br />
|type=bool<br />
|set=0<br />
|text=True for sequence header parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isString<br />
|type=bool<br />
|set=0<br />
|text=True for string parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=isToggle<br />
|type=bool<br />
|set=0<br />
|text=True for toggle parameters.<br />
}}<br />
{{ClassMember<br />
|class=Par<br />
|name=style<br />
|type=str<br />
|set=0<br />
|text=Describes the behavior and contents of the custom parameter. Example <code>'Float'</code>, <code>'Int'</code>, <code>'Pulse'</code>, <code>'XYZ'</code>, etc.<br />
}}<br />
{{SubSection|title=Menu Parameters<br />
|text=Menu parameters can be get or set by specifying either the string value of the menu, or its numeric index. For example, the following are equivalent:<br />
<syntaxhighlight lang=python><br />
op('geo1').par.xord = 'trs'<br />
op('geo1').par.xord = 5<br />
</syntaxhighlight><br />
Alternatively, the menu can be accessed more directly:<br />
<syntaxhighlight lang=python><br />
n = op('geo1')<br />
n.par.xord.menuIndex = 5 #trs<br />
a = n.menuNames[0] #returns 'srt'<br />
b = n.menuLabels[0] #returns 'Scale Rotate Translate'<br />
</syntaxhighlight><br />
}}}}<br />
{{ClassMethodSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|class=Par<br />
|name=copy<br />
|call=copy(Par)<br />
|returns=None<br />
|text=Copy the specified [[Par Class|parameter]].<br />
*Par - The parameter to copy.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.copy( op('geo2').par.tx )<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=eval<br />
|call=eval()<br />
|returns=value<br />
|text=Evaluate a parameter. This value may be derived by the parameter's constant value, expression, or export, dependent on its mode.<br />
<syntaxhighlight lang=python><br />
a = op('geo1').par.tx.eval()<br />
</syntaxhighlight><br />
<br />
Calling <code>eval</code> on an OP parameter that can hold multiple OPs will return a single OP if there is only 1 result, a list of OPs if there are more than 1, and None if there are no results.<br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=evalNorm<br />
|call=evalNorm()<br />
|returns=value<br />
|text=Similar to eval() but the returns the normalized slider value.<br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=evalExpression<br />
|call=evalExpression()<br />
|returns=value<br />
|text=Evaluate the expression portion of a parameter, if it contains one. This will ignore any exports, etc.<br />
<syntaxhighlight lang=python><br />
a = op('geo1').par.tx.evalExpression()<br />
</syntaxhighlight><br />
'''Note''': the results of evalExpression is always the expression's Python return value, which can be slightly different than <code>Par.eval()</code>. For example, in parameters that hold an operator, <code>.eval()</code> will always return an operator if it exists, even if the expression actually returns a string path. The evalExpression function would return the string path.<br />
<br />
To evaluate an arbitrary expression string, that is not inside a parameter, see [[OP Class|OP]].evalExpression.}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=evalExport<br />
|call=evalExport()<br />
|returns=value<br />
|text=Evaluate the export portion of a parameter, if it contains one. This will ignore any expressions, etc.<br />
<syntaxhighlight lang=python><br />
a = op('geo1').par.tx.evalExport()<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=evalOPs<br />
|call=evalOPs()<br />
|returns=list<br />
|text=Evaluate the parameter as series of operators. This is useful for a custom parameter that specifies a list of operator paths for example.<br />
<syntaxhighlight lang=python><br />
a = op('base1').par.Paths.evalOPs()<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=pulse<br />
|call=pulse(value, frames=nframes, seconds=nseconds)<br />
|returns=None<br />
|text=Pulsing sets a parameter to the specific value, cooks the operator, then restores the parameter to its previous value.<br />
For pulse type parameters no value is specified or used.<br />
*value - (Optional) The value to pulse this parameter with, default is 1.<br />
*frames - (Optional) Number of frames before restoring the parameter to its original value.<br />
*seconds - (Optional) Number of seconds before restoring the parameter to its original value.<br />
<syntaxhighlight lang=python><br />
op('moviein1').par.reload.pulse(1) #set the reload toggle, then cook<br />
op('glsl1').par.loadvariablenames.pulse() #activate the pulse parameter<br />
op('geo1').par.ty.pulse(2, frames=120) #pulse geometry ty for 120 frames<br />
op('text1').par.text.pulse('GO!', seconds=3) #pulse text TOP string field, for 3 seconds<br />
op('noise').par.type.pulse('random', seconds=0.5) #pulse noise meny type for half a second<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=destroy<br />
|call=destroy()<br />
|returns=None<br />
|text=Destroy the parameter referenced by this Par. An exception will be raised if the parameter has already been destroyed. Only custom and sequential parameters can be destroyed. Destroying a sequential parameter will destroy its entire block. Note: When any parameter is destroyed, any existing parameter objects will be invalid and should be re-fetched.<br />
}}<br />
{{ClassMethod<br />
|class=Par<br />
|name=reset<br />
|call=reset()<br />
|returns=bool<br />
|text=Resets the parameter to its default state.<br />
Returns true if anything was changed.<br />
<syntaxhighlight lang=python><br />
op('geo1').par.tx.reset()<br />
</syntaxhighlight>}}<br />
{{SubSection|title=Casting to a Value<br />
|text=The Par Class implements all necessary methods to be treated as a number or string, which in this case gets or sets its value. Therefore, an explicit call to <syntaxhighlight lang=python inline>eval()</syntaxhighlight> or <syntaxhighlight lang=python inline>set()</syntaxhighlight> is unnecessary when used in a parameter, or in a numeric expression.<br />
<br />
For example, the following are equivalent in a parameter:<br />
<br />
*<syntaxhighlight lang=python inline>(float)me.par.tx</syntaxhighlight><br />
*<syntaxhighlight lang=python inline>me.par.tx.eval()</syntaxhighlight><br />
*<syntaxhighlight lang=python inline>me.par.tx</syntaxhighlight><br />
<br />
The following are also equivalent:<br />
<br />
*<syntaxhighlight lang=python inline>me.par.tx.eval() + 1</syntaxhighlight><br />
*<syntaxhighlight lang=python inline>me.par.tx + 1</syntaxhighlight><br />
<br />
As are the following:<br />
<br />
*<syntaxhighlight lang=python inline>me.par.tx.val = 3</syntaxhighlight><br />
*<syntaxhighlight lang=python inline>me.par.tx = 3</syntaxhighlight><br />
}}}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=App_Class&diff=30617App Class2023-12-20T15:53:18Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=App|summary=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|td module]].<br />
<br />
'''NOTE:''' See also [[Variables]] and Dialogs -> Variables where more built-in paths and strings are available via expressions in the form <code>var('DESKTOP')</code>, <code>var('MYDOCUMENTS')</code> and <code>var('TOENAME')</code>.}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|class=App<br />
|name=architecture<br />
|type=str<br />
|set=0<br />
|text=The architecture of the compile. Generally 32 or 64 bit.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=binFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing the binaries.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=build<br />
|type=str<br />
|set=0<br />
|text=Application build number.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=compileDate<br />
|type=tuple(year, month, day)<br />
|set=0<br />
|text=The date the application was compiled, expressed as a tuple (year, month, day).<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=configFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing configuration files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=desktopFolder<br />
|type=str<br />
|set=0<br />
|text=Current user's desktop folder.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=enableOptimizedExprs<br />
|type=bool<br />
|set=1<br />
|text=Get or set if Python expression optimization is enabled. Defaults to True every time TouchDesigner starts.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=experimental<br />
|type=bool<br />
|set=0<br />
|text=Returns true if the App is an experimental build, false otherwise.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=installFolder<br />
|type=str<br />
|set=0<br />
|text=Main installation folder.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=launchTime<br />
|type=float<br />
|set=0<br />
|text=Total time required to launch and begin playing the toe file, measured in seconds.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=logExtensionCompiles<br />
|type=bool<br />
|set=1<br />
|text=Get or set if extra messages for starting and ending compiling extensions is sent to the textport. Additional error stack will be printed if compilation fails. Defaults to False every time TouchDesigner starts.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=osName<br />
|type=str<br />
|set=0<br />
|text=The operating system name.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=osVersion<br />
|type=str<br />
|set=0<br />
|text=The operating system version.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=power<br />
|type=bool<br />
|set=1<br />
|text=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.<br />
<syntaxhighlight lang=python><br />
app.power = False #turn off the power button.<br />
</syntaxhighlight><br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=preferencesFolder<br />
|type=str<br />
|set=0<br />
|text=Folder where the preferences file is located.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=processId<br />
|type=int<br />
|set=0<br />
|text=The ID of the current running process.}}<br />
{{ClassMember<br />
|class=App<br />
|name=product<br />
|type=str<br />
|set=0<br />
|text=Type of executable the project is running under. Values are 'TouchDesigner', 'TouchPlayer' or 'TouchEngine'.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=pythonExecutable<br />
|type=str<br />
|set=0<br />
|text=Path to TouchDesigner's Python executable. This executable is not used directly by TouchDesigner but can be used to test pure Python code in an environment with all the packages and modules included with TouchDesigner. The executable can also be used to run external Python scripts without installing a separate Python installation.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=recentFiles<br />
|type=list<br />
|set=1<br />
|text=Get or set the list of most recently saved or loaded files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=samplesFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing configuration files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=paletteFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing palette files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=userPaletteFolder<br />
|type=str<br />
|set=0<br />
|text=Folder where custom user palettes are located.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=version<br />
|type=str<br />
|set=0<br />
|text=Application version number.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=windowColorBits<br />
|type=int<br />
|set=0<br />
|text=The number of color bits per color channel the TouchDesigner window is running at. By default this will be 8-bits per channel, but can be increased to 10-bits by settings env var TOUCH_10_BIT_COLOR=1. Only works on displays that support 10-bit color.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=systemFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing system files.}}<br />
{{ClassMember<br />
|class=App<br />
|name=tempFolder<br />
|type=str<br />
|set=0<br />
|text=Folder used for temporary files.}} <br />
}}<br />
{{ClassMethodSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|class=App<br />
|name=addNonCommercialLimit<br />
|call=addNonCommercialLimit(password)<br />
|returns=None<br />
|text=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. (See also [[Licenses Class|licenses.disablePro]]) member.<br />
*password - (Keyword, Optional) Password to later remove the restriction.<br />
<syntaxhighlight lang=python><br />
app.addNonCommercialLimit('secret123') #undoable with password<br />
app.addNonCommercialLimit() #permanent during length of session.<br />
</syntaxhighlight><br />
}} <br />
{{ClassMethod<br />
|class=App<br />
|name=removeNonCommercialLimit<br />
|call=removeNonCommercialLimit(password)<br />
|returns=bool<br />
|text=Removes the restriction previously added. Returns True if successful.<br />
*password - (Keyword) Password previously used when restriction added.<br />
<syntaxhighlight lang=python><br />
app.removeNonCommercialLimit('secret123')<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=App<br />
|name=addResolutionLimit<br />
|call=addResolutionLimit(x,y password)<br />
|returns=None<br />
|text=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.<br />
*x - Width of maximum texture resolution, measured in pixels.<br />
*y - Height of maximum texture resolution, measured in pixels.<br />
*password - (Keyword, Optional) Password to later remove the restriction.<br />
<syntaxhighlight lang=python><br />
app.addResolutionLimit(600, 480, 'secret123') #undoable with password<br />
app.addResolutionLimit() #permanent during length of session.<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=App<br />
|name=removeResolutionLimit<br />
|call=removeResolutionLimit(password)<br />
|returns=bool<br />
|text=Removes the restriction previously added. Returns True if successful.<br />
*password - (Keyword) Password previously used when restriction added.<br />
<syntaxhighlight lang=python><br />
app.removeResolutionLimit('secret123')<br />
</syntaxhighlight><br />
}}}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=File:Bitwig_OSC_parameters.png&diff=30506File:Bitwig OSC parameters.png2023-12-12T14:41:11Z<p>Rob: </p>
<hr />
<div></div>Robhttps://docs.derivative.ca/index.php?title=TDBitwig_User_Guide&diff=30505TDBitwig User Guide2023-12-12T14:37:43Z<p>Rob: </p>
<hr />
<div>= Introduction =<br />
<br />
[[TDBitwig]] is a set of TouchDesigner components that enables bi-directional communication between [http://www.bitwig.com/ Bitwig Studio] and TouchDesigner. The [[TDBitwig]] functionality enables users to create custom audio-visual performances by integrating real-time visuals with live audio output.<br />
<br />
For information about Bitwig Studio go here… (https://www.bitwig.com/)<br />
<br />
= Overview =<br />
<br />
=== Bitwig API ===<br />
<br />
TDBitwig’s ability to read and control information in a Bitwig session relies entirely on the '''Bitwig Studio Control Surface API'''. The TouchDesigner controller script serves to extend the functionality of this API and achieve the full capability of the TDBitwig System.<br />
<br />
The Control Surface API is widely used to support a variety of hardware controllers like MIDI devices, and enables users to expand the level of interactivity in their recording and performance workflows.<br />
<br />
Much of the inspiration for the TDBitwig Controller extension comes from the well documented library of [https://github.com/bitwig/bitwig-extensions Bitwig Studio controller scripts] as well as the [https://www.mossgrabers.de/Software/Bitwig/Bitwig.html DrivenByMoss] extension collection written by Jurgen Mossgraber.<br />
<br />
=== Open Sound Control (OSC) ===<br />
<br />
The communication between TouchDesigner and Bitwig Studio relies on Open Sound Control (OSC), a message-based protocol using UDP. The use of OSC allows for communication between any number of devices on a network, and enables the TDBitwig System to send high-resolution data between separate devices running TouchDesigner and Bitwig Studio respectively.<br />
<br />
=== System Design ===<br />
<br />
The design for the TDBitwig System was largely motivated by the popular application of the Bitwig API to support hardware controllers. Similarly, the TDBitwig Component Set can be thought of as a collection of software-based controllers; each component communicates with it’s respective part of the Bitwig session and has its own set of buttons and sliders for controlling certain Bitwig parameters. What distinguishes software-based controllers from their physical counterparts is the increased ability to access and control Bitwig session information in a programmatic environment like TouchDesigner.<br />
<br />
= Getting Started =<br />
<br />
== Installation ==<br />
<br />
'''System Requirements:'''<br />
<br />
* Bitwig Studio Version 5.0.11 +<br />
* TouchDesigner 2022.35280 +<br />
<br />
== Setup ==<br />
<br />
# Open '''Bitwig Studio.'''<br />
# Setup your newly imported controller extension.<br />
#* Open ''Dashboard'' → ''Settings'' → ''Controllers'' → ''+ Add Controller''<br />
#* Choose Hardware Vendor : ''Derivative.''<br />
#* Choose Product: ''TouchDesigner.''<br />
#* Click ''Add.''<br />
# Open '''TouchDesigner.'''<br />
# In '''TouchDesigner''', import the '''bitwigMain''' COMP.<br />
#* Open the TouchDesigner ''palette.''<br />
#* Click on the ''TDBitwig'' folder.<br />
#* Drag the ''bitwigMain'' COMP into your project.<br />
# If you are using the system on one computer, a connection should be established at this point since the OSC ports are set to match by default. If you are working on 2 computers or wish to use different OSC port numbers, refer to the Configuring OSC section below.<br />
# You can verify the connection status with the “connected” channel in the bitwigMain COMP’s OP view. If properly connected the value should be 1 and you can begin using the system. If a connection is not established, refer to the Troubleshooting section below.<br />
<br />
=== Custom Extension Installation ===<br />
Bitwig Studio includes the Touchdesigner controller extension file in their Bitwig builds, so updates to that file will be timed with their minor releases. <br />
<br />
<br />
=== Configuring OSC ===<br />
<br />
You can locate the settings to configure your OSC connection in the following areas:<br />
<br />
* TouchDesigner:<br />
** Click on the <code>bitwigMain</code> Component in your project,<br />
** In the '''parameter window''', navigate to the '''Setup''' parameter page.<br />
* Bitwig Studio:<br />
** Open the '''Dashboard,''' and in the '''Settings''' Pane, scroll to the '''Controllers''' Section.<br />
** You should see the controller settings for the '''TouchDesigner''' controller extension.<br />
** Make sure the '''active icon''' for the controller is '''on''' to view the settings window.<br />
<br />
<br />
<gallery mode = "packed" heights=160px><br />
File:Bitwig OSC parameters.png|none|x700px|thumb|TouchDesigner OSC<br />
File:Bitwig OSC Settings.png|none|x700px|thumb|Bitwig OSC<br />
</gallery><br />
<br />
To properly setup your OSC connection, make sure of the following:<br />
<br />
* The <code>Bitwig IP Address</code> setting in TouchDesigner matches the '''IP''' address of the '''device running Bitwig'''<br />
* The <code>TouchDesigner IP Address</code> setting in Bitwig matches the '''IP''' address of the '''device running TouchDesigner'''<br />
* The <code>TouchDesigner In Port</code> number in TouchDesigner matches the <code>TouchDesigner Port</code> number in Bitwig<br />
* The <code>Bitwig Port</code> number in TouchDesigner matches the <code>Bitwig In Port</code> number in Bitwig<br />
<br />
'''Note:'''<br />
<br />
In Bitwig, you will need to restart the controller extension every time you change the <code>TouchDesigner IP Address</code> or <code>TouchDesigner Port</code> setting since they cannot be changed at run time.<br />
<br />
To restart the extension, de-activate and re-activate the controller by clicking the '''power icon''' in the top left of the controller window.<br />
<br />
== Troubleshooting ==<br />
<br />
If you are experiencing any problems, the most useful tool for troubleshooting will be the '''Textport'''. Be sure to have it open while troubleshooting, as most errors will be reported there.<br />
<br />
The most common issues with TDBitwig will involve '''connections'''. The most important connection will be the network connection between the <code>bitwigMain</code> Component and the TouchDesigner controller extension in Bitwig. To test this connection, use the <code>Ping</code> parameter belonging to the <code>bitwigMain</code> Component, located in the '''Debug''' parameter page. Once pressed, you should see a “ping sent” message followed by a “ping reply received” message in the Textport. If the reply message does not appear, it may indicate that your OSC network is not configured properly or your device’s firewall is blocking the connection.<br />
<br />
The TouchDesigner controller extension in Bitwig is also equipped with a '''Send Ping''' button which will send a ping message to the specified IP and port. This functionality can serve useful for testing the connection from Bitwig to TouchDesigner.<br />
<br />
In addition to the ping test, all of the TDBitwig Components have a '''Connect''' parameter which can be used to manually reset connections. In the bitwigMain Component it is located in the '''Setup''' page, for all others it exists in the '''TDBitwig''' page. Toggling the parameter off and on will restart a connection and may reveal useful error messages indicating the problem.<br />
<br />
If connectivity issues persist, try closing your external text editor and any other sub-processes of TouchDesigner. For some reason, OSC ports can be associated with these sub-processes and the ports will not reopen until the applications are closed. Also, if two projects running TDBitwig are open and are using identical ports, it will cause port conflict issues.<br />
<br />
For more verbose descriptions of lower-level activity, you can enable the following parameters in the bitwigMain COMP:<br />
<br />
# <code>Log Messages</code>: print to Textport all incoming and outgoing OSC Messages<br />
# <code>Debug Messages</code>: print to Texport information about calls to the python extension methods belonging to this Component. All TDBitwig Components come with this toggle and in most use cases will not be necessary.<br />
<br />
Note:<br />
<br />
There is a 3rd party application called [https://hexler.net/protokol Protokol], which provides a user-friendly OSC network checker. This may serve useful for network troubleshooting.<br />
<br />
= Component Concepts =<br />
<br />
== Cursors ==<br />
<br />
The ability of Components to navigate Bitwig and select which object they are interested in (Track, Device, Clip Slot, or Parameter Page) relies on the concept of '''Cursors'''. In Bitwig, Cursors are used to point to a particular object, and there are different ways users can decide how a cursor selects an object. Any TDBitwig Component which communicates with a non-global Bitwig object has a corresponding cursor(s) within Bitwig.<br />
<br />
'''Components using Cursors:'''<br />
<br />
{| class="wikitable"<br />
|+<br />
|-<br />
! Component !! CursorTrack !! CursorClip !! CursorDevice !! CursorRemoteControlsPage<br />
|-<br />
| <code>bitwigTrack</code> || ● || ○ || ○ || ○<br />
|-<br />
| <code>bitwigClip</code> || ● || ● || ○ || ○<br />
|-<br />
| <code>bitwigRemotesDevices</code> || ● || ○ || ● || ●<br />
|-<br />
| <code>bitwigRemotesTrack</code> || ● || ○ || ○ || ●<br />
|-<br />
| <code>bitwigRemotesProject</code> || ○ || ○ || ○ || ●<br />
|-<br />
| <code>bitwigNote</code> || ● || ○ || ○ || ○<br />
|}<br />
<br />
One way to think about cursors is that if the object I am interested in '''is''' or '''belongs to''' a specific object, then I will use a cursor to select that object. For example, to access a specific device’s remote controls page, I will use the CursorTrack to select the track that the device belongs to, use the CursorDevice to select the device that the remotes page belongs to, then use the CursorRemoteControlsPage to select the remotes page. Note that the selection of objects via cursors will almost always begin by choosing the '''Track''', with the exception of the bitwigRemotesProject, because the project remotes are global.<br />
<br />
=== Cursor Navigation ===<br />
<br />
'''Pinning:'''<br />
<br />
By default, the cursor selection will follow whichever object is currently selected in the '''Bitwig User Interface''' unless it is '''pinned'''. The pinning functionality applies to '''CursorTracks''', '''CursorClips''' and '''CursorDevices'''. If a Cursor Object is '''un-pinned''', you can change the selection of the Cursor by clicking on the desired object in the Bitwig UI.<br />
<br />
Example:<br />
<br />
: Let’s say a CursorTrack is currently pointing to track “Instrument 2” and is '''un-pinned.''' If I click on “Instrument 1” in Bitwig Studio, my CursorTrack will '''follow''' the UI selection, and now points to “Instrument 1”.<br />
<br />
If the Cursor is '''pinned''', it’s selection will '''not change''' even if a different object is selected in the Bitwig UI.<br />
<br />
Going back to our example:<br />
<br />
: If a CursorTrack is currently pointing to track “Instrument 2” and is '''pinned'''; if I click on “Instrument 1” in Bitwig Studio, my CursorTrack selection will '''remain''', and still point to “Instrument 2”.<br />
<br />
The use of pinning and un-pinning becomes a convenient way to select objects in TDBitwig by interacting with the Bitwig UI. The Component parameters <code>Pin Track</code> and <code>Pin Device</code> allow users to pin and unpin Cursors within TouchDesigner.<br />
<br />
<gallery mode = "packed" heights=160px><br />
File:CursorTrack NavigationPars.png|thumb|Cursor Track Navigation<br />
File:CursorDevice NavigationPars.png|thumb|Cursor Device Navigation<br />
</gallery><br />
<br />
'''Scrolling:'''<br />
<br />
In addition to the pinning functionality, you can also use the scroll feature of Cursors to change their selection. The idea of scrolling is much more straightforward; cursors provide the ability to '''select''' the '''next''' or '''previous''' object based on the order in the Bitwig UI.<br />
<br />
In TDBitwig, this functionality is realized for CursorTracks with the <code>Prev Track</code> and <code>Next Track</code> parameters, or in the case of CursorDevices, the <code>Prev Device</code> and <code>Next Device</code> parameters. Pressing these will change the current cursor selection to either the previous or next object.<br />
<br />
== Observers ==<br />
<br />
Observers (aka listeners) define which attributes belonging to a Bitwig object we are interested in. Each TDBitwig Component has a set of observers associated with it, which defines the attribute scope it has access to and can control.<br />
<br />
If an observer is active, any update to the attribute associated with that observer in Bitwig will trigger a callback that sends an OSC message to TouchDesigner informing the updated value. In the TDBitwig system, Component parameters are “linked” to observers, such that if an OSC message containing an updated value is received, it will change the parameter value to match the updated value from Bitwig.<br />
<br />
Conversely, when an update to a parameter occurs in TouchDesigner, a callback will send an OSC message to Bitwig containing the updated observed value, and the controller extension will update the Bitwig attribute associated with the observer accordingly. The use of observers allows for bi-directional control of parameters/attributes between the 2 applications in this way.<br />
<br />
== Limitations ==<br />
<br />
Because Bitwig Observers cannot be added after controller '''initialization''', we are limited to a '''finite''' number of '''objects''' we are observing as well as the '''properties''' of the object we are observing. This limitation is most relevant to the amount of Cursor Objects made available to the TDBitwig system, particularly the amount of CursorTracks and Project CursorRemoteControlPages.<br />
<br />
The system is designed such that any Component with Track Selection functionality has a one-to-one relationship with a CursorTrack. Therefore, the total number of these TDBitwig Components in a project will be limited to the number of CursorTracks available. The same relationship exists between the bitwigRemotesProject COMP and the Project CursorRemoteControlsPage.<br />
<br />
Currently the system supports:<br />
<br />
'''256 CursorTracks''':<br />
<br />
: i.e. the '''total''' number of '''<code>bitwigTrack</code>''', '''<code>bitwigClipSlot</code>''','''<code>bitwigClip</code>''', '''<code>bitwigRemotesDevice</code>''', '''<code>bitwigRemotesTrack</code>''', and '''<code>bitwigNote</code>''' COMPs may not exceed 256<br />
<br />
'''64 Project CursorRemoteControlsPages''':<br />
<br />
: i.e. the number of '''<code>bitwigRemotesProject</code>''' COMPs may not exceed 64<br />
<br />
== Cursor Mapping ==<br />
<br />
The correspondence between TDBitwig Object Components and their respective Bitwig Cursor is established by a mapping of the Component to the index of the Cursor it is listening to. When a Component requiring a Cursor is created, it will request a cursor index from the bitwigMain COMP; the bitwigMain COMP will find the next available Cursor and assign its index to the Object Component which made the request. This mapping allows the TDBitwig system to route incoming and outgoing information between TDBitwig Components and the Bitwig Objects they are communicating with.<br />
<br />
The Bitwig COMPs which use a Bitwig Cursor will have a Listener Index parameter representing the cursor index they have been assigned. This index will also exist as a header for the Out CHOP channels within the Component. Once a Component has been created and successfully assigned a cursor index, its mapping will never change as long as that Component Object exists. The only instances in which cursor mappings will change is when a new Component is created or a Component is deleted.<br />
<br />
= Component Set =<br />
<br />
== System Components ==<br />
<br />
=== [https://docs.derivative.ca/Experimental:Palette:bitwigMain bitwigMain] ===<br />
<br />
<gallery mode = "packed" heights=350px><br />
File:BitwigMain TD.png<br />
</gallery><br />
'''Description:'''<br />
<br />
The <code>bitwigMain</code> COMP serves as the '''central communication''' '''hub''' for the TDBitwig system, and is responsible for relaying most of the information between the Bitwig session and TDBitwig Object Components in a project. This COMP is necessary for every connection to a Bitwig Studio Session; for most use cases only '''one''' is required but there are real situations which may require more.<br />
<br />
The interaction with the Component will mainly pertain to connection configuration, users can locate the configuration settings in the Setup Parameter Page. A detailed explanation of the configuring process is provided in the above Configuring OSC section. Once connected, all the TDBitwig Object Components referencing this COMP will be enabled for use.<br />
<br />
Refer to the bitwigMain documentation page to find a detailed description of this Component and its parameters.<br />
<br />
=== [https://docs.derivative.ca/Experimental:Palette:tdBitwigPackage tdBitwigPackage] ===<br />
<br />
<gallery mode = "packed" heights=350px><br />
File:TdBitwigPackage Pars.png<br />
</gallery><br />
<br />
'''Description:'''<br />
<br />
The <code>tdBitwigPackage</code> COMP allows users to '''update''' their TDBitwig Components in a project to the most recent released version. To bring your TDBitwig project up-to-date, locate this Component in the TouchDesigner ''Palette'', within the ''TDBitwig'' folder. Drag this Component into your project, and press the ''Update'' parameter located in the ''About'' parameter page. Once pressed, all the existing TDBitwig Components existing in the current project will be updated to the version associated with the tdBitwigPackage COMP.<br />
<br />
== Object Components ==<br />
<br />
<span id="common-features"></span><br />
=== Common Features ===<br />
<br />
The TDBitwig Object Components rely on a common framework, and therefore will share a set of common features.<br />
<br />
'''Chop Output:'''<br />
<br />
The first (and sometimes only) output of the Object Components will be a CHOP Out. The CHOP will contain numeric data corresponding to the properties that the Component is listening to. Each property value will have its own channel, and the channel name will contain the type of object and name of the property that the value belongs to. Some Components have multiple outputs; these will be described in their respective sections.<br />
<br />
'''TDBitwig Parameter Page:'''<br />
<br />
This parameter page will contain information and functionality pertaining to the TDBitwig system.<br />
<br />
* '''<code>TDBitwig Comp</code>''' : A reference to the Bitwig Main COMP<br />
* '''<code>Connect</code>''' : A toggle to manually enable or disable listeners associated with this COMP.<br />
* '''<code>Debug Messages</code>''' : Print information about extension method calls for the Component<br />
* '''<code>Timeslice OSC Chop</code>''' : A toggle to enable or disable time-slicing for the OSC In CHOP. When off, CHOP outputs will only cook when OSC messages are received. When on, CHOP outputs will cook constantly, but their cook time may be lower. <br />
* '''<code>Strip CHOP Prefix Segments</code>''' : Strip off the given number of address segments in the output CHOP channel names. This can help manage the length of the channel names and make them more simple to read. <br />
<br />
'''About Page:'''<br />
<br />
This parameter page will contain information and functionality pertaining to version and updates.<br />
<br />
* '''<code>Help</code>''' : Opens the Component documentation page<br />
* '''<code>Version</code>''' : The TDBitwig version that the Component is updated to<br />
* '''<code>.tox Save Build</code>''' : The TouchDesigner build version that the Component was saved in<br />
* '''<code>Update</code>''' : If the tdBitwigPackage COMP is present in the TouchDesigner project, pressing pulse will update the Component to the newest version<br />
<br />
'''Track/Device Navigation:'''<br />
<br />
Because many of the objects in Bitwig are associated with a track, users will commonly begin object navigation by selecting a track object, followed by the object belonging to the track (device, clip, remoteControlPage, etc.). For an in-depth explanation of object selection, read the Cursors section above.<br />
<br />
=== [https://docs.derivative.ca/Experimental:Palette:bitwigSong bitwigSong] ===<br />
<br />
<gallery mode = "packed" heights=400px><br />
File:BitwigSong outs.png|<br />
</gallery><br />
'''Description:'''<br />
<br />
The <code>bitwigSong</code> COMP acts as a bi-directional interface for Bitwig’s '''global transport'''; including timing, playback, and recording functionality. It also stores information about scenes and cues, and supports control for their playback.<br />
<br />
'''Extra Outputs:'''<br />
<br />
* '''beatCHOP''' : simulates the Beat CHOP operator<br />
* '''cueInfo''' : a table of cueMarker info<br />
* '''sceneInfo''' : a table of scenes<br />
* '''currentCueInfo''' : provides info about the nearest cue marker left of the playhead<br />
<br />
'''Promoted Methods:'''<br />
<br />
<ul><br />
<li><p>'''<code>LaunchCue(cueIndex)</code>''' :</p><br />
<p>Move playhead position to the specified cue and start playback</p><br />
:<p><code>cueIndex</code>: integer index of the chosen cue to launch</p><br />
</li><br />
<li><p>'''<code>LaunchScene(sceneIndex)</code>''' :</p><br />
<p>Start playback of all clips at the specified scene index</p><br />
:<p><code>sceneIndex</code>: integer index of the chosen scene to launch</p><br />
</li></ul><br />
<br />
'''Callbacks:'''<br />
<ul><br />
<li><p>'''<code>onCuePassed(info)</code>''' :</p><br />
<p>The playhead location is on the cue marker’s position</p><br />
<p><code>'''info''' </code>: dictionary containing cue info</p><br />
:<p><code>index </code>: index of cue</p><br />
:<p><code>name </code>: name of cue</p></li><br />
<li><p>'''<code>onCueChanged(info)</code>''' :</p><br />
<p>The nearest cue marker left of the playhead has changed</p><br />
<p><code>'''info''' </code>: dictionary containing cue info</p><br />
:<p><code>index </code>: index of cue</p><br />
:<p><code>name </code>: name of cue</p></li><br />
<li><p>'''<code>onPlay(info)</code>''' :</p><br />
<p>Transport starts playback</p></li><br />
<li><p>'''<code>onStop(info)</code>''' :</p><br />
<p>Transport stops playback</p></li><br />
<li><p>'''<code>onLoopStartPassed</code>''' :</p><br />
<p>playhead location is on the loop start position</p></li></ul><br />
<br />
=== [https://docs.derivative.ca/Experimental:Palette:bitwigTrack bitwigTrack] ===<br />
<br />
<gallery mode = "packed" heights=400px><br />
File:BitwigTrack Pars.png<br />
</gallery><br />
'''Description:'''<br />
<br />
The <code>bitwigTrack</code> COMP acts as an interface for accessing and controlling the attributes of a given Bitwig Track object. It allows users to choose the specific track they are interested in and perform any actions accordingly.<br />
<br />
=== [https://docs.derivative.ca/Experimental:Palette:bitwigClipSlot bitwigClipSlot] ===<br />
<br />
<gallery mode = "packed" heights=400px><br />
File:ClipLauncher Outs.png<br />
</gallery><br />
'''Description:'''<br />
<br />
The <code>bitwigClipSlot</code> COMP serves as an interface for controlling clip slot playback and receiving playback information of all clip slots for a given track. Users begin by choosing which track they are interested in; from there they can access the clip slots associated with that track, and subsequently decide to perform actions on a specific clip slot.<br />
<br />
'''Extra Outputs:'''<br />
<br />
* '''clipInfo''' : a table of clip slot information for the given track<br />
* '''clipStatusInfo''' : provides the current playing clip and current queued for playback clip<br />
<br />
'''Promoted Methods:'''<br />
<br />
<ul><br />
<li><p>'''<code>LaunchClip(clipSlotIndex)</code>''' :</p><br />
<p>Launches clip at the specified index, playback behavior will depend on the Transport launch settings</p><br />
:<p><code>clipSlotIndex</code>: integer index of the clip to launch</p><br />
</li><br />
<li><p>'''<code>SelectClip(clipSlotIndex)</code>''' :</p><br />
<p>Selects clip at specified index in the Bitwig Clip Launcher Window</p><br />
:<p><code>clipSlotIndex</code>: integer index of the clip to select</p><br />
</li><br />
<li><p>'''<code>StopClip(clipSlotIndex)</code>''' :</p><br />
<p>Stops playback of clip at specified index. Behavior will depend on Transport launch settings</p><br />
:<p><code>clipSlotIndex</code>: integer index of the clip to stop</p><br />
</li><br />
<li><p>'''<code>RecordClip(clipSlotIndex)</code>''' :</p><br />
<p>Arms the clip for recording. If the Clip Slot is empty, a new clip will be created. Recording behavior will depend on Transport settings.</p><br />
:<p><code>clipSlotIndex</code>: integer index of the clip to record</p><br />
</li><br />
</ul><br />
<br />
'''Callbacks:'''<br />
<br />
<ul><br />
<li><p>'''<code>onPlayingClipChanged(info)</code>'''</p><br />
<p>The current playing clip has changed</p><br />
<p><code>'''info'''</code> : dictionary containing clip info</p><br />
:<p><code>index</code> : index of clip slot</p><br />
:<p><code>name</code> : name of clip slot</p></li><br />
<li><p>'''<code>onQueuedClipChanged(info)</code>'''</p><br />
<p>The current queued for playback clip has changed</p><br />
<p><code>'''info'''</code> : dictionary containing clip info</p><br />
:<p><code>index</code> : index of clip slot</p><br />
:<p><code>name</code> : name of clip slot</p></li></ul><br />
<br />
=== [https://docs.derivative.ca/Experimental:Palette:bitwigClip bitwigClip] ===<br />
<br />
<gallery mode = "packed" heights=400px><br />
File:ClipLauncher Outs.png<br />
</gallery><br />
'''Description:'''<br />
<br />
The <code>bitwigClip</code> COMP serves as an interface for controlling clip playback and clip attributes in Bitwig’s clip launcher context. Users begin by choosing which track they are interested in; from there they can perform actions or read/modify the properties of a given launcher clip.<br />
<br />
=== [https://docs.derivative.ca/Experimental:Palette:bitwigRemotesDevice bitwigRemotesDevice] ===<br />
<br />
<gallery mode = "packed" heights=300px><br />
File:DeviceRemotes ControlsPar.png<br />
File:Bitwig DeviceRemotes Page.png<br />
</gallery><br />
<br />
'''Description:'''<br />
<br />
The <code>bitwigRemotesDevice</code> COMP serves as an interface for accessing and controlling '''Device Remote Controls''' in Bitwig. Navigation to controls begins by selecting a track, followed by the device within that track, and ending with the desired page. The 8 Remote Control Parameters on this Component will correspond to the 8 Remote Controls on a single page.<br />
<br />
=== [https://docs.derivative.ca/Experimental:Palette:bitwigRemotesTrack bitwigRemotesTrack] ===<br />
<br />
<gallery mode = "packed" heights=300px><br />
File:TrackRemotes ControlPars.png<br />
File:Bitwig TrackRemotes Page.png<br />
</gallery><br />
<br />
'''Description:'''<br />
<br />
The <code>bitwigRemotesTrack</code> COMP serves as an interface for accessing and controlling '''Track Remote Controls''' in Bitwig. Navigation to controls begins by selecting a track, followed by the desired page. The 8 Remote Control Parameters on this Component will correspond to the 8 Remote Controls on a single page.<br />
<br />
=== [https://docs.derivative.ca/Experimental:Palette:bitwigRemotesProject bitwigRemotesProject] ===<br />
<br />
<gallery mode = "packed" heights=300px><br />
File:ProjectRemotes TouchDesigner pars.png<br />
File:Bitwig ProjectRemotes Page.png<br />
</gallery><br />
<br />
'''Description:'''<br />
<br />
The <code>bitwigRemotesProject</code> COMP serves as an interface for accessing and controlling global '''Project Remote Controls''' in Bitwig. Navigation to controls begins by selecting the desired page. The 8 Remote Control Parameters on this Component will correspond to the 8 Remote Controls on a single page.<br />
<br />
=== [https://docs.derivative.ca/Experimental:Palette:bitwigNote bitwigNote] ===<br />
<br />
<gallery mode = "packed" heights=400px><br />
File:BitwigNote Pars.png<br />
</gallery><br />
<br />
'''Description:'''<br />
<br />
The <code>bitwigNote</code> COMP allows users to read a live stream of note events on a given Bitwig Track. The incoming notes will correspond to the track’s note input source, whether it be output from a midi device or side-chained from another track or device within Bitwig. Users will use the navigation controls to specify which track’s input source they want to monitor.<br />
<br />
'''Callbacks:'''<br />
<ul><br />
<li><p>'''<code>onNoteEvent(info)</code>''' :</p><br />
<p>A note event has occurred, includes note on, note off, or velocity change</p><br />
<p><code>'''info'''</code>: dictionary containing note event info</p><br />
: <p><code>pitch</code> : pitch index of the note</p><br />
: <p><code>velocity</code> : velocity of the note</p></li></ul><br />
<br />
== Auxiliary Components ==<br />
<br />
=== [https://docs.derivative.ca/Experimental:Palette:bitwigSelect bitwigSelect] ===<br />
<br />
<gallery mode = "packed" heights=400px><br />
File:BitwigSelect Parameters2.png<br />
</gallery><br />
'''Description:'''<br />
<br />
The <code>bitwigSelect</code> COMP enables users to retrieve channel information from the output CHOP of any Bitwig Object Component in a project. Component search can be filtered by the Object type, and once the output CHOP is selected, users can filter specific channels they are interested in. The selection of Components uses python references based on '''relative''' paths. Similarly to the application of the select OP, this Component creates a clean separation of data between the source and points of influence.<br />
<br />
'''Relative Paths'''<br />
<br />
The <code>Select Relative To This Comp </code> parameter determines if the path used to reference the desired Object Component is relative to the bitwigMain Component or the bitwigSelect Component being used. Paths relative to the bitwigMain COMP will be stable when the location of this bitwigSelect COMP changes, but will break if the location of the selected COMP changes. Paths relative to the bitwigSelect COMP will break if the location of either the selected COMP or the bitwigSelect COMP changes, but will be easier to read and allows users to drag and drop the desired COMP into the 'Selected COMP' parameter. The choice between relative to bitwigMain or bitwigSelect will generally be a trade-off between stability and ease-of-use.<br />
<br />
'''Channel Snapshot'''<br />
<br />
In the case of the bitwigNote COMP, there will be moments when the selected output CHOP is empty, particularly during connection processes on startup. This will cause errors in any references made to the channels which previously populated the output CHOP. To resolve this, the bitwigSelect COMP supports the ability to snapshot the current selected channels. Once snapshot, the output of the bitwigSelect COMP will remain on the snapped channels and will not be affected if the selected output CHOP is empty, keeping references to channels intact.</div>Robhttps://docs.derivative.ca/index.php?title=Timer_CHOP&diff=30479Timer CHOP2023-12-06T16:12:54Z<p>Rob: </p>
<hr />
<div>{{Summary<br />
|opFamily=CHOP<br />
|opLicense=Non-Commercial<br />
|opLabel=Timer<br />
|short=The Timer CHOP is an engine for running timed processes. It outputs channels such as timing fractions, counters, pulses and timer states, and it calls python functions (callbacks) when various timing events occur.<br />
|opFilter=False<br />
|long=The Timer CHOP is an engine for running timed processes. It outputs channels such as timing fractions, counters, pulses and timer states, and it calls python functions (callbacks) when various timing events occur. <br />
<br />
Examples using the Timer CHOP include triggering multiple timed cues, running playlists, timelines, state machines, and driving pre-animated animation components in 3D scenes. See Help -> Operator Snippets for numerous examples. <br />
<br />
You set a timer to a number of seconds, frames or samples, and trigger it to start via the Start parameter or the second input CHOP. The Timer CHOP outputs in seconds, frames, samples, fraction and on-off states as it’s counting, including a <code>done</code> channel that goes on when it is complete. When it reaches certain states like end-of-cycles or when it’s done, various python callbacks are called allowing you to customize its behavior. <br />
<br />
The Timer CHOP gets triggered by events (via pulsing its parameters or driving its two inputs). It takes events in, counts time, changes state. Via its python callback functions, you can send events out to other nodes, set parameters, get/set values in DATs, CHOPs and storage, restart itself, or trigger other nodes. As such, it can operate as a state machine. <br />
<br />
It has play/pause, plus a speed control to slow down or speed up the timer. <br />
<br />
It can also cycle indefinitely and then can be signaled to end immediately or at the end of the current cycle. <br />
<br />
One Timer CHOP can also have multiple timers within it. By attaching a Table DAT you can define one timer (segment) per row. In Serial Timers mode it allows for one time segment followed by another. In Parallel Timers mode, the timers all run in parallel, each with its own begin time and length, and its own set of output channels. <br />
<br />
[[image:Timer CHOP.2.png]] <br />
<br />
The Timer CHOP can be Locked to Timeline in a deterministic way, or run more freely in Sequential Mode. When run independently from the timeline, you can jump ahead, break out of cycles, pause, <code>goTo()</code> exact position or timecode in the timer, and dynamically adjust the speed.<br />
<br />
The Timer CHOPs can be chained together, so that when one ends, the next can begin. They just need to all be Initialized together, where the <code>ready_pulse</code> channel of one Timer CHOP is exported to the Initialize parameter of the next Timer CHOP. Then they can be run in sequence, where the output of one Timer CHOP’s <code>done_pulse</code> channel is wired to the Start input (or exported to the Start parameter) of the next Timer CHOP. You start the chain of timers by starting the first Timer CHOP. By using some Timer CHOPs to loop awaiting input or response, or by adding logic to decide which CHOP to start next, state machines can be implemented. <br />
<br />
Attach an Info DAT to see the timecodes, or use the <code>.timecode</code> members. Custom text strings can be placed in the Info DAT for each segment, and custom animated channels can be created. <br />
<br />
To make the entire CHOP loop after the last segment, set the On Done menu to Re-Start. <br />
<br />
'''Recommended''': the '''OP Snippets for Timer CHOP'''. See the channel descriptions in [[Initialize Start]]. <br />
<br />
===Callbacks===<br />
The callbacks are called at different moments during the timer progression.<br />
<br />
<code>onInitialize()</code> gets called when you pulse the Initialize parameter. Here you can prepare any part of your setup prior to starting. At the end of Initialize the timer goes into a "ready" state.<br />
<br />
<code>onStart()</code> gets called on the frame that the Start parameter is pulsed. The timer then goes into a "running" state.<br />
<br />
<code>onTimerActive()</code> gets called every frame that the timer is running and there is no Delay or Play is off.<br />
<br />
<code>onCycleStart()</code> gets called if the timer is set to cycle via the Cycle parameters.<br />
<br />
Before a cycle or segment ends, an <code>onCycleEndAlert()</code> callback based on the Cycle End Alert parameter can be called to allow you to prepare for the next cycle, segment or Timer CHOP.<br />
<br />
<code>onSegmentEnter()</code> and <code>onSegmentExit()</code> get called if the timer is being driven by a Segments DAT which acts like several timers in one. The argument <code>segment</code> in these callbacks is actually an object with useful members including any custom columns you have in your segment table: In <code>onSegmentEnter()</code>, put the code <code>print(help(segment))</code><br />
<br />
<code>onDone()</code> gets called when the timer reaches its finished state.<br />
<br />
You can initialize at a specific time by using <code>.masterSeconds</code> in <code>onInitialize()</code>.<br />
<br />
'''See also''': [[Trigger CHOP]], [[Event CHOP]], [[Speed CHOP]], [[Count CHOP]], [[Beat CHOP]], [[Event CHOP]], [[Clock CHOP]], [[Delay CHOP]], [[CHOP Execute DAT]], [[LFO CHOP]]. <br />
time measurements<br />
{{{!}} class="wikitable"<br />
{{!}}+ Time Measurements and what affects them<br />
{{!}}-<br />
! Name !! Speed !! Play !! Cycles !! Go To and Cueing !! Subrange !! Delay Between Segments<br />
{{!}}-<br />
{{!}} Cumulative Time Count {{!}}{{!}} slows if speed<1 {{!}}{{!}} pauses when off {{!}}{{!}} jumps back {{!}}{{!}} jumps {{!}}{{!}} jumps {{!}}{{!}} pauses<br />
{{!}}-<br />
{{!}} Playing Time Count {{!}}{{!}} unaffected {{!}}{{!}} pauses when off {{!}}{{!}} keeps counting {{!}}{{!}} keeps counting {{!}}{{!}} keeps counting {{!}}{{!}} keeps counting<br />
{{!}}-<br />
{{!}} Running Time Count {{!}}{{!}} unaffected {{!}}{{!}} unaffected {{!}}{{!}} keeps counting {{!}}{{!}} keeps counting {{!}}{{!}} keeps counting {{!}}{{!}} keeps counting<br />
{{!}}-<br />
{{!}} Master Time Count {{!}}{{!}} slows if speed<1 {{!}}{{!}} pauses when off {{!}}{{!}} jumps back {{!}}{{!}} jumps {{!}}{{!}} jumps {{!}}{{!}} keeps counting<br />
{{!}}-<br />
{{!}} Segment + Fraction {{!}}{{!}} 0 to 1 per-segment {{!}}{{!}} pauses when off {{!}}{{!}} jumps back {{!}}{{!}} jumps {{!}}{{!}} jumps {{!}}{{!}} pauses<br />
{{!}}}<br />
|opType=timer<br />
|opClass=timerCHOP_Class<br />
|opCategories=<br />
}}<br />
{{ParameterPage<br />
|pageSummary=<br />
|items={{Parameter<br />
|parSummary=The Timer cooks: Never / Always / While Running (while in "running" state) / While Playing (while in "running" state and Play is on).<br />
|opFamily=CHOP<br />
|parName=active<br />
|parOrder=0<br />
|opType=timer<br />
|parLabel=Active<br />
|parType=Menu<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parOrder=1<br />
|parSummary='''Sequential''' (timeline-independent) or '''Locked to Timeline'''. In Locked to Timeline, non-deterministic features are disabled. '''External CHOP Channel''' lets you drive the master time (<code>.masterSeconds</code> etc) using a CHOP channel defined by the parameters on the External page. '''External Timecode''' lets you drive the master time using a timecode CHOP/DAT/Object.<br />
|opFamily=CHOP<br />
|parName=timecontrol<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=timecontrol<br />
|itemSummary=Output is determined by the current frame position.<br />
|itemName=lock<br />
|itemLabel=Lock To Timeline<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=timecontrol<br />
|itemSummary=Output runs continuously, regardless of current frame position.<br />
|itemName=sequential<br />
|itemLabel=Sequential<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=timecontrol<br />
|itemSummary=Output is determined by external CHOP channel value.<br />
|itemName=chop<br />
|itemLabel=External CHOP Channel<br />
}}{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=timecontrol<br />
|itemSummary=Output is determined by the value of an external timecode.<br />
|itemName=timecode<br />
|itemLabel=External Timecode<br />
}}<br />
|opType=timer<br />
|parLabel=Time Control<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parSummary=When On, parameter changes like Length, Cycles and others are ignored until the next Intitalize. When Off, paraameter changes affect the timer immediately (possibly giving jumps in state).<br />
|opFamily=CHOP<br />
|parName=deferpars<br />
|parOrder=5<br />
|opType=timer<br />
|parLabel=Defer Par Changes<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=(pulse parameter) Initialize is the signal to get the timer ready: sets the counters to zero (delay, timer, cycle, segment), set the output channels in the proper state, <code>done</code> to be off, the onInitialize() callback is run, and when initialize is complete, it indicates it’s ready by turning on the <code>ready</code> channel, awaiting a Start pulse.<br />
|opFamily=CHOP<br />
|parName=initialize<br />
|parOrder=6<br />
|opType=timer<br />
|parLabel=Initialize<br />
|parType=Pulse<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=(pulse) Start is the signal to commence the timers counting. It will count through the delay first, then the timer length. It does an Initialize if it is not already initialized, and then starts counting.<br />
|opFamily=CHOP<br />
|parName=start<br />
|parOrder=7<br />
|opType=timer<br />
|parLabel=Start<br />
|parType=Pulse<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=Length Type<br />
|parName=lengthtype<br />
|parType=Menu<br />
|parReadOnly=<br />
|parOrder=8<br />
|parSummary=Describes how the length is defined.<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=lengthtype<br />
|itemLabel=Fixed<br />
|itemName=fixed<br />
|itemSummary=Lengths are finite, that is of a specific duration.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=lengthtype<br />
|itemLabel=Infinite<br />
|itemName=infinite<br />
|itemSummary=The segments run continuously without end.<br />
}}<br />
}}<br />
{{Parameter<br />
|parSummary=(float) the time-length of the timer. Set the Units menu to Seconds, Frames or Samples.<br />
|opFamily=CHOP<br />
|parName=length<br />
|parOrder=9<br />
|opType=timer<br />
|parLabel=Length<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parOrder=10<br />
|parSummary=Choose between using Samples, Frames, or Seconds as the units for this parameter.<br />
|opFamily=CHOP<br />
|parName=lengthunits<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=lengthunits<br />
|itemLabel=I<br />
|itemName=samples<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=lengthunits<br />
|itemLabel=F<br />
|itemName=frames<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=lengthunits<br />
|itemLabel=S<br />
|itemName=seconds<br />
|itemSummary=<br />
}}<br />
|opType=timer<br />
|parLabel=Length Units<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parSummary=(float) after Start, the delay before the timer begins counting.<br />
|opFamily=CHOP<br />
|parName=delay<br />
|parOrder=11<br />
|opType=timer<br />
|parLabel=Delay<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parOrder=12<br />
|parSummary=Choose between using Samples, Frames, or Seconds as the units for this parameter.<br />
|opFamily=CHOP<br />
|parName=delayunits<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=delayunits<br />
|itemLabel=I<br />
|itemName=samples<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=delayunits<br />
|itemLabel=F<br />
|itemName=frames<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=delayunits<br />
|itemLabel=S<br />
|itemName=seconds<br />
|itemSummary=<br />
}}<br />
|opType=timer<br />
|parLabel=Delay Units<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parSummary=(onoff) Pauses the timer. It is basically a 0 or 1 multiplier on the Speed.<br />
|opFamily=CHOP<br />
|parName=play<br />
|parOrder=13<br />
|opType=timer<br />
|parLabel=Play<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=(default 1) Slows down or speeds up the timer.<br />
|opFamily=CHOP<br />
|parName=speed<br />
|parOrder=14<br />
|opType=timer<br />
|parLabel=Speed<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Freezes playing at the Cue Point.<br />
|opFamily=CHOP<br />
|parName=cue<br />
|parOrder=15<br />
|opType=timer<br />
|parLabel=Cue<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Jump instantly to the Cue Point.<br />
|opFamily=CHOP<br />
|parName=cuepulse<br />
|parOrder=16<br />
|opType=timer<br />
|parLabel=Cue Pulse<br />
|parType=Pulse<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Time (Seconds, Frames or Fraction) which the cue point is frozen to.<br />
|opFamily=CHOP<br />
|parName=cuepoint<br />
|parOrder=17<br />
|opType=timer<br />
|parLabel=Cue Point<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parOrder=18<br />
|parSummary=Choose between using Samples, Frames, Seconds, Fraction(0-1) as the units for this parameter.<br />
|opFamily=CHOP<br />
|parName=cueunits<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=cueunits<br />
|itemLabel=I<br />
|itemName=samples<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=cueunits<br />
|itemLabel=F<br />
|itemName=frames<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=cueunits<br />
|itemLabel=S<br />
|itemName=seconds<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=cueunits<br />
|itemLabel=%<br />
|itemName=fraction<br />
|itemSummary=<br />
}}<br />
|opType=timer<br />
|parLabel=Cue Units<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parSummary=(default Off) causes the timer to loop back to 0 when it reaches the end of the cycle.<br />
|opFamily=CHOP<br />
|parName=cycle<br />
|parOrder=19<br />
|opType=timer<br />
|parLabel=Cycle<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=When the Cycle parameter is On, this determines if it will cycle indefinitely or cycle some maximum number of cycles.<br />
|opFamily=CHOP<br />
|parName=cyclelimit<br />
|parOrder=20<br />
|opType=timer<br />
|parLabel=Cycle Limit<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=When Cycle is on and Cycle Limit is on, this sets the maximum number of cycles.<br />
|opFamily=CHOP<br />
|parName=maxcycles<br />
|parOrder=21<br />
|opType=timer<br />
|parLabel=Maximum Cycles<br />
|parType=Int<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=The number of seconds, frames or samples before a cycle, segment or done state is reached that the <code>onCycleEndAlert()</code> callback is called. This allows you to prepare for the next cycle, segment or timer.<br />
|opFamily=CHOP<br />
|parName=cycleendalert<br />
|parOrder=22<br />
|opType=timer<br />
|parLabel=Cycle End Alert<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parOrder=23<br />
|parSummary=Choose between using Samples, Frames, or Seconds as the units for this parameter.<br />
|opFamily=CHOP<br />
|parName=notifyunits<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=notifyunits<br />
|itemLabel=I<br />
|itemName=samples<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=notifyunits<br />
|itemLabel=F<br />
|itemName=frames<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=notifyunits<br />
|itemLabel=S<br />
|itemName=seconds<br />
|itemSummary=<br />
}}<br />
|opType=timer<br />
|parLabel=Notify Units<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parSummary=When pulsed, it will exit the cycle (and segment) at the end of the currently-playing cycle.<br />
|opFamily=CHOP<br />
|parName=exitendcycle<br />
|parOrder=24<br />
|opType=timer<br />
|parLabel=Exit Segment at End of Cycle<br />
|parType=Pulse<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=When pulsed, it will exit the cycle (and segment) immediately.<br />
|opFamily=CHOP<br />
|parName=gotoendcycle<br />
|parOrder=25<br />
|opType=timer<br />
|parLabel=Go to End of Cycle<br />
|parType=Pulse<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Will immediately go to the Done state.<br />
|opFamily=CHOP<br />
|parName=gotodone<br />
|parOrder=26<br />
|opType=timer<br />
|parLabel=Go to Done<br />
|parType=Pulse<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parOrder=27<br />
|parSummary=Determines which action to take when the timer gets to the end, ie "is done" or finished. Note there is also a onDone callback that can be used for customizing behavior.<br />
|opFamily=CHOP<br />
|parName=ondone<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=ondone<br />
|itemSummary=No action taken.<br />
|itemName=donothing<br />
|itemLabel=Do Nothing<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=ondone<br />
|itemSummary=Will re-initialize the timer, this is the same as pulsing the Initialize parameter above.<br />
|itemName=reinit<br />
|itemLabel=Re-Initialize<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=ondone<br />
|itemSummary=Will re-initialize and re-start the timer, this is the same as pulsing the Start parameter above.<br />
|itemName=restart<br />
|itemLabel=Re-Start<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=ondone<br />
|itemLabel=Re-Start without Initializing<br />
|itemName=restartnoinit<br />
|itemSummary=Will re-star the timeer without re-initializing.<br />
}}<br />
|opType=timer<br />
|parLabel=On Done<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parSummary=The path to the DAT containing callbacks for this Timer CHOP.<br />
|opFamily=CHOP<br />
|parName=callbacks<br />
|parOrder=28<br />
|opType=timer<br />
|parLabel=Callbacks DAT<br />
|parType=DAT<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|opFamily=CHOP<br />
|pageName=Timer<br />
}}<br />
{{ParameterPage<br />
|pageSummary=You can specify multiple timers in one Timer CHOP. A "segment" acts as one timer, with its own length, delay time, number of cycles to repeat and other conditions.<br />
|items={{Parameter<br />
|parSummary=A table DAT that contains one row per timer (segment). The column headings can be <code>delay</code> or <code>begin</code>, <code>length</code>, <code>cycle</code>, <code>cyclelimit</code>, <code>maxcycles</code> and <code>cycleendalert</code>, which override the equivalent parameters. (These are the internal names for the corresponding parameters.) <code>begin</code> is unique as it replaces <code>delay</code>, and it represents the time from Start that the timer will begin counting, whether the CHOP is set to Serial Timers or Parallel Timers (see Segment Method). <br />
<br />
The Segments DAT also can include any number of custom columns. See Columns to Custom Channels and Columns to Info DAT below.<br />
|opFamily=CHOP<br />
|parName=segdat<br />
|parOrder=0<br />
|opType=timer<br />
|parLabel=Segments DAT<br />
|parType=DAT<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parOrder=1<br />
|parSummary=If the Segment Method is '''Serial Timers''', the timers will be played back-to-back. If the Segment Method is '''Parallel Timers''', the timers can be played at the same time, and a set of channels will be output for each timer.<br />
|opFamily=CHOP<br />
|parName=segmethod<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=segmethod<br />
|itemSummary=<br />
|itemName=serial<br />
|itemLabel=Serial Timers<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=segmethod<br />
|itemSummary=<br />
|itemName=parallel<br />
|itemLabel=Parallel Timers<br />
}}<br />
|opType=timer<br />
|parLabel=Segment Method<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parOrder=2<br />
|parSummary=For the columns <code>delay</code>, <code>begin</code>, <code>length</code> and <code>cycleendalert</code>, you specify whether it’s seconds, frames or samples with this menu.<br />
|opFamily=CHOP<br />
|parName=segunits<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=segunits<br />
|itemSummary=<br />
|itemName=samples<br />
|itemLabel=Samples<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=segunits<br />
|itemSummary=<br />
|itemName=frames<br />
|itemLabel=Frames<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=segunits<br />
|itemSummary=<br />
|itemName=seconds<br />
|itemLabel=Seconds<br />
}}<br />
|opType=timer<br />
|parLabel=Segment Units<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=Segments End Time<br />
|parName=segsendtime<br />
|parType=Menu<br />
|parReadOnly=<br />
|parOrder=3<br />
|parSummary=Describes how the end time is calculated.<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=segsendtime<br />
|itemLabel=From Segments DAT<br />
|itemName=dat<br />
|itemSummary=The end time is based on the Segments DAT values.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=segsendtime<br />
|itemLabel=From Length Parameter<br />
|itemName=par<br />
|itemSummary=The end time is based on the Length parameter value.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=segsendtime<br />
|itemLabel=Max of Parameter/Table<br />
|itemName=max<br />
|itemSummary=The end time is based on the greater of the Length parameter value and the Segments DAT values.<br />
}}<br />
}}<br />
{{Parameter<br />
|parSummary=Optional extra columns (any name) in the segments DAT can be output as extra channels (the columns must contain numbers). Specify their names in the Columns to Channels parameter. The channel name will be the column name. You can also output the <code>length</code>, <code>delay</code>, etc columns as channels.<br />
|opFamily=CHOP<br />
|parName=channelcolumns<br />
|parOrder=4<br />
|opType=timer<br />
|parLabel=Columns to Custom Channels<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parOrder=5<br />
|parSummary=By default, custom channels step to their new value at the begin of the segment. This menu lets you interpolate to the new value linearly, or any combination of ease-in and ease-out.<br />
|opFamily=CHOP<br />
|parName=interpolation<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=interpolation<br />
|itemSummary=<br />
|itemName=steptovalue<br />
|itemLabel=Step to Value<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=interpolation<br />
|itemSummary=<br />
|itemName=lineartovalue<br />
|itemLabel=Linear to Value<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=interpolation<br />
|itemSummary=<br />
|itemName=easeintovalue<br />
|itemLabel=Ease In to Value<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=interpolation<br />
|itemSummary=<br />
|itemName=easeouttovalue<br />
|itemLabel=Ease Out to Value<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=interpolation<br />
|itemSummary=<br />
|itemName=easeinouttovalue<br />
|itemLabel=Ease In-Out to Value<br />
}}<br />
|opType=timer<br />
|parLabel=Custom Channel Interpolation<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parSummary=Optional extra columns (any name) in the segments DAT can be output to the Info DAT (attach an Info DAT to the Timer CHOP) if you specify their names in this parameter.<br />
|opFamily=CHOP<br />
|parName=infocolumns<br />
|parOrder=6<br />
|opType=timer<br />
|parLabel=Columns to Info DAT<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=(pulse) Jump to Previous Segment.<br />
|opFamily=CHOP<br />
|parName=gotoprevseg<br />
|parOrder=7<br />
|opType=timer<br />
|parLabel=Go to Previous Segment<br />
|parType=Pulse<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=(pulse) Jump to Next Segment. <br />
<br />
''Lingo'' <br />
* Segment – each segment acts as one timer, with delay time, length, number of cycles to repeat and other conditions. <br />
* Begin – in Parallel Timers, the number of seconds after a Start (frames or samples) after which each timer starts counting up from zero. <br />
* Done – The state it goes into when all the timers has finished counting, whether they are in Parallel or Serial, Segments or not. <br />
* End – Cycle End is the end of each cycle, Segment End is the end of the segment. <br />
* Cumulative Time – Zero at Start, a count that is affected by speed and rises while timers are active (not during delays). <br />
* Running Time – Zero at Start, the wall-clock time since Start was called no matter what are the delays, speeds, cycles or premature clicking of Go To Segment End. It stops counting when Done has been reached.<br />
|opFamily=CHOP<br />
|parName=gotonextseg<br />
|parOrder=8<br />
|opType=timer<br />
|parLabel=Go to Next Segment<br />
|parType=Pulse<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|opFamily=CHOP<br />
|pageName=Segments<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Sub Range<br />
|pageSummary=Operate the timer within a sub range of the total length.<br />
|items={{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=Sub Range<br />
|parName=subrange<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=0<br />
|parSummary=Turn this parameter on to limit the timer output to a subrange of the full length.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=Sub Start<br />
|parName=substart<br />
|parType=Float<br />
|parReadOnly=<br />
|parOrder=1<br />
|parSummary=The beginning point of the sub range.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=Sub Start Units<br />
|parName=substartunits<br />
|parType=Menu<br />
|parReadOnly=<br />
|parOrder=2<br />
|parSummary=Choose between using Samples, Frames, or Seconds as the units for this parameter.<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=substartunits<br />
|itemLabel=I<br />
|itemName=samples<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=substartunits<br />
|itemLabel=F<br />
|itemName=frames<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=substartunits<br />
|itemLabel=S<br />
|itemName=seconds<br />
|itemSummary=<br />
}}<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=Sub End<br />
|parName=subend<br />
|parType=Float<br />
|parReadOnly=<br />
|parOrder=3<br />
|parSummary=The end point of the sub range.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=Sub End Units<br />
|parName=subendunits<br />
|parType=Menu<br />
|parReadOnly=<br />
|parOrder=4<br />
|parSummary=Choose between using Samples, Frames, or Seconds as the units for this parameter.<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=subendunits<br />
|itemLabel=I<br />
|itemName=samples<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=subendunits<br />
|itemLabel=F<br />
|itemName=frames<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=subendunits<br />
|itemLabel=S<br />
|itemName=seconds<br />
|itemSummary=<br />
}}<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=Sub End Action<br />
|parName=subendaction<br />
|parType=Menu<br />
|parReadOnly=<br />
|parOrder=5<br />
|parSummary=Controls the behavior once the sub range end point is reached: Loop at End, or Pause at End.<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=subendaction<br />
|itemLabel=Pause at End<br />
|itemName=pause<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=subendaction<br />
|itemLabel=Loop at End<br />
|itemName=loop<br />
|itemSummary=<br />
}}<br />
}}<br />
}}<br />
{{ParameterPage<br />
|pageSummary=<br />
|items={{Parameter<br />
|parSummary=Outputs channel <code>timer_fraction</code> for each segment.<br />
|opFamily=CHOP<br />
|parName=outfraction<br />
|parOrder=0<br />
|opType=timer<br />
|parLabel=Timer Fraction<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parOrder=1<br />
|parSummary=Outputs the elapsed Seconds channel as <code>timer_seconds</code>, Frames outputs channel as <code>timer_frames</code>, or Samples outputs channel as <code>timer_samples</code>. Because this is elapsed time, <code>timer_frames</code> starts at 0, as do the others.<br />
|opFamily=CHOP<br />
|parName=outtimercount<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outtimercount<br />
|itemSummary=<br />
|itemName=off<br />
|itemLabel=Off<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outtimercount<br />
|itemSummary=<br />
|itemName=samples<br />
|itemLabel=Samples<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outtimercount<br />
|itemSummary=<br />
|itemName=frames<br />
|itemLabel=Frames<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outtimercount<br />
|itemSummary=<br />
|itemName=seconds<br />
|itemLabel=Seconds<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outtimercount<br />
|itemLabel=All<br />
|itemName=all<br />
|itemSummary=<br />
}}<br />
|opType=timer<br />
|parLabel=Timer Count<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>timer_active</code> which is on only while the timer fraction is counting (is non-zero).<br />
|opFamily=CHOP<br />
|parName=outtimeractive<br />
|parOrder=2<br />
|opType=timer<br />
|parLabel=Timer Active<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>timer_pulse</code> when the timer reaches its length.<br />
|opFamily=CHOP<br />
|parName=outtimerpulse<br />
|parOrder=3<br />
|opType=timer<br />
|parLabel=Timer Pulse<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs a 0-1 fraction in <code>delay_fraction</code> while the delay occurs.<br />
|opFamily=CHOP<br />
|parName=outdelayfraction<br />
|parOrder=4<br />
|opType=timer<br />
|parLabel=Delay Fraction<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parOrder=5<br />
|parSummary=Outputs the delay count in seconds, frames or samples.<br />
|opFamily=CHOP<br />
|parName=outdelaycount<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outdelaycount<br />
|itemSummary=<br />
|itemName=off<br />
|itemLabel=Off<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outdelaycount<br />
|itemSummary=<br />
|itemName=samples<br />
|itemLabel=Samples<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outdelaycount<br />
|itemSummary=<br />
|itemName=frames<br />
|itemLabel=Frames<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outdelaycount<br />
|itemSummary=<br />
|itemName=seconds<br />
|itemLabel=Seconds<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outdelaycount<br />
|itemLabel=All<br />
|itemName=all<br />
|itemSummary=<br />
}}<br />
|opType=timer<br />
|parLabel=Delay Count<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>initializing</code> = 1 while the timer is initalizing (i.e. while the callback <code>onInitialize()</code> returns non-zero).<br />
|opFamily=CHOP<br />
|parName=outinit<br />
|parOrder=6<br />
|opType=timer<br />
|parLabel=Initializing<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>ready</code> which is 1 after an Initialize and before a Start.<br />
|opFamily=CHOP<br />
|parName=outready<br />
|parOrder=7<br />
|opType=timer<br />
|parLabel=Ready<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs a pulse when initialization has finished and the timer is ready to start. It pulses even when the timer starts rights away after an initialization.<br />
|opFamily=CHOP<br />
|parName=outreadypulse<br />
|parOrder=8<br />
|opType=timer<br />
|parLabel=Ready Pulse<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>running</code> which is 1 after a Start and before the Done.<br />
|opFamily=CHOP<br />
|parName=outrunning<br />
|parOrder=9<br />
|opType=timer<br />
|parLabel=Running<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>done</code> when done or complete.<br />
|opFamily=CHOP<br />
|parName=outdone<br />
|parOrder=10<br />
|opType=timer<br />
|parLabel=Done<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>done</code> when the all timers have reached their completion.<br />
|opFamily=CHOP<br />
|parName=outdonepulse<br />
|parOrder=11<br />
|opType=timer<br />
|parLabel=Done Pulse<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>cycles</code>, which is the number of cycles completed (In a segment), starting with 0 during the entire first cycle. If you jump to Done, cycle is incremented as if it played normally to the done state.<br />
|opFamily=CHOP<br />
|parName=outcycle<br />
|parOrder=12<br />
|opType=timer<br />
|parLabel=Cycles<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs a pulse at the end of every cycle, even on the first and only cycle.<br />
|opFamily=CHOP<br />
|parName=outcyclepulse<br />
|parOrder=13<br />
|opType=timer<br />
|parLabel=Cycle Pulse<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>cycle_plus_fraction</code>, starting with 0 for entire first cycle.<br />
|opFamily=CHOP<br />
|parName=outcycleplusfraction<br />
|parOrder=14<br />
|opType=timer<br />
|parLabel=Cycles + Fraction<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>segment</code>, starting with 0 for first segment.<br />
|opFamily=CHOP<br />
|parName=outseg<br />
|parOrder=15<br />
|opType=timer<br />
|parLabel=Segment<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>segment_pulse</code> which is a pulse at the end of each segment.<br />
|opFamily=CHOP<br />
|parName=outsegpulse<br />
|parOrder=16<br />
|opType=timer<br />
|parLabel=Segment Pulse<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=Outputs channel <code>segment_plus_fraction</code>, starting with 0 for first segment ending at #segments at end.<br />
|opFamily=CHOP<br />
|parName=outsegplusfraction<br />
|parOrder=17<br />
|opType=timer<br />
|parLabel=Segment + Fraction<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=Length<br />
|parName=outlength<br />
|parType=Menu<br />
|parReadOnly=<br />
|parOrder=18<br />
|parSummary=Outputs channel <code>length</code>, starting with 0 for first segment ending at #segments at end.<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outlength<br />
|itemLabel=Off<br />
|itemName=off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outlength<br />
|itemLabel=Seconds<br />
|itemName=seconds<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outlength<br />
|itemLabel=Frames<br />
|itemName=frames<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outlength<br />
|itemLabel=Samples<br />
|itemName=samples<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outlength<br />
|itemLabel=All<br />
|itemName=all<br />
|itemSummary=<br />
}}<br />
}}<br />
{{Parameter<br />
|parOrder=19<br />
|parSummary=Outputs <code>cumulative_seconds</code>, <code>cumulative_frames</code> or <code>cumulative_samples</code>. It is a time count that adds up all the Timer Active times for all segments since Start: it is affected by "Speed", and counts up only while <code>timer_active</code> (Play) is on. See the python member <code>.cumulativeSeconds</code>.<br />
|opFamily=CHOP<br />
|parName=outcumulativecount<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outcumulativecount<br />
|itemSummary=<br />
|itemName=off<br />
|itemLabel=Off<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outcumulativecount<br />
|itemSummary=<br />
|itemName=samples<br />
|itemLabel=Samples<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outcumulativecount<br />
|itemSummary=<br />
|itemName=frames<br />
|itemLabel=Frames<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outcumulativecount<br />
|itemSummary=<br />
|itemName=seconds<br />
|itemLabel=Seconds<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outcumulativecount<br />
|itemLabel=All<br />
|itemName=all<br />
|itemSummary=<br />
}}<br />
|opType=timer<br />
|parLabel=Cumulative Timer Count<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=Playing Timer Count<br />
|parName=outplayingcount<br />
|parType=Menu<br />
|parReadOnly=<br />
|parOrder=20<br />
|parSummary=Outputs <code>playing_seconds</code>, <code>playing_frames</code> or <code>playing_samples</code>. It is a time count that adds up all the Timer Active times for all segments since Start: it is not affected by "Speed", and counts up only while <code>timer_active</code> and <code>play</code> is on. See the python member <code>.playingSeconds</code>.<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outplayingcount<br />
|itemLabel=Off<br />
|itemName=off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outplayingcount<br />
|itemLabel=Seconds<br />
|itemName=seconds<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outplayingcount<br />
|itemLabel=Frames<br />
|itemName=frames<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outplayingcount<br />
|itemLabel=Samples<br />
|itemName=samples<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outplayingcount<br />
|itemLabel=All<br />
|itemName=all<br />
|itemSummary=<br />
}}<br />
}}<br />
{{Parameter<br />
|parOrder=21<br />
|parSummary=Outputs the "wall-clock" time since Start occurred, no matter what are the delays, speeds, cycles or pre-mature clicking of Go To Segment End, etc. It stops counting when Done has been reached. <code>running_seconds</code>, <code>running_frames</code>, or <code>running_samples</code>. When CHOP is set to Parallel Timers, this will output a channel per segment plus one global running time channel. See the python member <code>.runningSeconds</code>.<br />
|opFamily=CHOP<br />
|parName=outrunningcount<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outrunningcount<br />
|itemSummary=<br />
|itemName=off<br />
|itemLabel=Off<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outrunningcount<br />
|itemSummary=<br />
|itemName=samples<br />
|itemLabel=Samples<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outrunningcount<br />
|itemSummary=<br />
|itemName=frames<br />
|itemLabel=Frames<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outrunningcount<br />
|itemSummary=<br />
|itemName=seconds<br />
|itemLabel=Seconds<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outrunningcount<br />
|itemLabel=All<br />
|itemName=all<br />
|itemSummary=<br />
}}<br />
|opType=timer<br />
|parLabel=Running Time Count<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=Master Time Count<br />
|parName=outmastercount<br />
|parType=Menu<br />
|parReadOnly=<br />
|parOrder=22<br />
|parSummary=Outputs <code>master_seconds</code>, <code>master_frames</code> or <code>master_samples</code>. It is a time count that adds up all the Timer Active times for all segments since Start: it is affected by "Speed", and counts up only while <code>timer_active</code> and <code>play</code> is on. It also includes any delay times. See the python member <code>.masterSeconds</code>.<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outmastercount<br />
|itemLabel=Off<br />
|itemName=off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outmastercount<br />
|itemLabel=Seconds<br />
|itemName=seconds<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outmastercount<br />
|itemLabel=Frames<br />
|itemName=frames<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outmastercount<br />
|itemLabel=Samples<br />
|itemName=samples<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=outmastercount<br />
|itemLabel=All<br />
|itemName=all<br />
|itemSummary=<br />
}}<br />
}}<br />
|opFamily=CHOP<br />
|pageName=Outputs<br />
}}<br />
{{ParameterPage<br />
|pageSummary=<br />
|items={{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=External CHOP<br />
|parName=extchop<br />
|parType=CHOP<br />
|parReadOnly=<br />
|parOrder=3<br />
|parSummary=The CHOP used to control the current point in the timer.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=External Units<br />
|parName=extunits<br />
|parType=Menu<br />
|parReadOnly=<br />
|parOrder=2<br />
|parSummary=Choose between using Samples, Frames, or Seconds as the units for this parameter.<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=extunits<br />
|itemLabel=I<br />
|itemName=samples<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=extunits<br />
|itemLabel=F<br />
|itemName=frames<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=extunits<br />
|itemLabel=S<br />
|itemName=seconds<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=extunits<br />
|itemLabel=%<br />
|itemName=fraction<br />
|itemSummary=<br />
}}<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=External Channel<br />
|parName=extchannel<br />
|parType=StrMenu<br />
|parReadOnly=<br />
|parOrder=4<br />
|parSummary=The channel that will control the current point of the timer.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=External Timecode Object<br />
|parName=exttcobj<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=1<br />
|parSummary=Time is specified using a timecode. Should be a reference to either a CHOP with channels 'hour', 'second', 'minute', 'frame', a DAT with a timecode string in its first cell, or a [[Timecode Class]] object.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=External Start Offset<br />
|parName=extstartoff<br />
|parType=Float<br />
|parReadOnly=<br />
|parOrder=3<br />
|parSummary=Specifies the external time at which the timer should start.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=timerCHOP<br />
|parLabel=External Initialize Offset<br />
|parName=extinitoff<br />
|parType=Float<br />
|parReadOnly=<br />
|parOrder=4<br />
|parSummary=Specifies the external time at which the timer should initialize.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parSummary=The sample rate that the CHOP outputs at, which is also used when the units of Length, Delay and Cycle End Alert time are set to Samples. The default sample rate is 60 samples per second.<br />
|opFamily=CHOP<br />
|parName=rate<br />
|parOrder=5<br />
|opType=timer<br />
|parLabel=Sample Rate<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|opFamily=CHOP<br />
|pageName=External<br />
}}<br />
{{:CHOP Generator Common Page}}<br />
{{InputsPage<br />
|opFamily=CHOP<br />
|opInputs={{OPInput<br />
|opFamily=CHOP<br />
|inputIndex=0<br />
|inputName=<br />
|inputSummary=<br />
}}<!--<br />
-->{{OPInput<br />
|opFamily=CHOP<br />
|inputIndex=1<br />
|inputName=<br />
|inputSummary=<br />
}}<br />
}}<br />
{{InfoCHOPChannels<br />
|opFamily=CHOP<br />
|opLabel=Timer<br />
|infoChannels={{InfoChannel<br />
|chanName=frames_timer<br />
|chanSummary=<br />
}}<br />
{{InfoChannel<br />
|chanName=frames_segment<br />
|chanSummary=<br />
}}<br />
{{InfoChannel<br />
|chanName=frames_cumulative<br />
|chanSummary=<br />
}}<br />
{{InfoChannel<br />
|chanName=frames_running<br />
|chanSummary=<br />
}}<br />
}}<br />
{{History<br />
}}<br />
{{CHOPNavBox<br />
|opFamily=CHOP<br />
}}<br />
{{#invoke:Category|list|CHOPs}}</div>Robhttps://docs.derivative.ca/index.php?title=File_In_CHOP&diff=28448File In CHOP2023-03-17T15:15:23Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opFilter=False <br />
|long=The File In CHOP reads in channel and audio files for use by CHOPs. The file can be read in from disk or from the web. Use <code>http://</code> when specifying a URL. <br />
<br />
===<div class="subSectionLineCHOP">Valid Formats</div>=== <br />
<br />
For a complete listing of all valid formats for CHOPs, see the [[File Types]] section. The types of files that can be read into CHOPs include: <br />
<br />
* <code>'''.chan'''</code> - Raw ASCII channel files; a row of numbers per frame. The channels are named automatically. <br />
* <code>'''.clip .bclip'''</code> - TouchDesigner native CHOP clip files. <br />
* <code>'''.aiff'''</code> - Audio files. <br />
* <code>'''.wav'''</code> - Audio files. <br />
<br />
===<div class="subSectionLineCHOP"> Outputting Channel Files </div>=== <br />
<br />
The same files can be output from the [[Mouse Click|RMB]] menu on the CHOP by selecting '''Save Data Channels'''. <br />
<br />
===<div class="subSectionLineCHOP"> Other Input Devices </div>=== <br />
<br />
For MIDI files (<code>.mid</code> or <code>.midi</code>), see the [[MIDI In CHOP]]. <br />
|opLabel=File In <br />
|opClass=fileinCHOP_Class <br />
|opType=filein <br />
|opLicense=Non-Commercial <br />
|opFamily=CHOP <br />
|short=The File In CHOP reads in channel and audio files for use by CHOPs. <br />
|opCategories= <br />
}} <br />
{{ParameterPage <br />
|pageName=File In <br />
|pageSummary= <br />
|opFamily=CHOP <br />
|items= <br />
{{Parameter|parOrder=0 <br />
|parSummary=The name of the file to load. Use http:// when specifying a URL. <br />
|opType=filein <br />
|parName=file <br />
|opFamily=CHOP <br />
|parLabel=Channel File <br />
|parType=File<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=1 <br />
|parSummary=Use this menu to control the names of the loaded channels. <br />
|opType=filein <br />
|parName=nameoption <br />
|opFamily=CHOP <br />
|parLabel=Name Options <br />
|parItems= <br />
{{ParameterItem|itemLabel=Use Names In File<br />
|itemName=infile<br />
|parName=nameoption<br />
|itemSummary=Use the channel names stored in the file.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Use New Names<br />
|itemName=new<br />
|parName=nameoption<br />
|itemSummary=Use the name specified in the Name parameter.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Use Filename<br />
|itemName=filename<br />
|parName=nameoption<br />
|itemSummary=Use the filename as the name for the loaded channels.<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=2 <br />
|parSummary=Used to name the channels when the Name Options parameter is set to Use New Names. <br />
|opType=filein <br />
|parName=name <br />
|opFamily=CHOP <br />
|parLabel=Name <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=3 <br />
|parSummary=Use this menu to adjust the sample rate of the loaded channels. <br />
|opType=filein <br />
|parName=rateoption <br />
|opFamily=CHOP <br />
|parLabel=Rate Options <br />
|parItems= <br />
{{ParameterItem|itemLabel=No Change<br />
|itemName=nochange<br />
|parName=rateoption<br />
|itemSummary=The sample rate is taken from the file.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Override<br />
|itemName=override<br />
|parName=rateoption<br />
|itemSummary=The sample rate is set to the number in the Sample Rate parameter, but the channels in the file are not resampled.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Resample<br />
|itemName=resample<br />
|parName=rateoption<br />
|itemSummary=Resamples at the specified Sample Rate. Takes the channels and the sample rate found in the file, and resamples it to the desired sample rate. This prevents very large arrays from being used in memory unnecessarily.<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=4 <br />
|parSummary=Samples per second, as utilized by the Rate Options parameter. <br />
|opType=filein <br />
|parName=rate <br />
|opFamily=CHOP <br />
|parLabel=Sample Rate <br />
|parType=Float<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=5 <br />
|parSummary=The left extend conditions (before/after range). <br />
|opType=filein <br />
|parName=left <br />
|opFamily=CHOP <br />
|parLabel=Extend Left <br />
|parItems= <br />
{{ParameterItem|itemLabel=No Change<br />
|itemName=asis<br />
|parName=left<br />
|itemSummary=Leave the channel as is.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Hold<br />
|itemName=hold<br />
|parName=left<br />
|itemSummary=Hold the current value of the channel.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Slope<br />
|itemName=slope<br />
|parName=left<br />
|itemSummary=Continue the slope before the start of the channel.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Cycle<br />
|itemName=cycle<br />
|parName=left<br />
|itemSummary=Cycle the channel repeatedly.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Mirror<br />
|itemName=mirror<br />
|parName=left<br />
|itemSummary=Cycle the channel repeatedly, mirroring every other cycle.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Default Value<br />
|itemName=default<br />
|parName=left<br />
|itemSummary=Use the constant value specified in the Default Value parameter<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=6 <br />
|parSummary=The right extend conditions (before/after range). <br />
|opType=filein <br />
|parName=right <br />
|opFamily=CHOP <br />
|parLabel=Extend Right <br />
|parItems= <br />
{{ParameterItem|itemLabel=No Change<br />
|itemName=asis<br />
|parName=right<br />
|itemSummary=Leave the channel as is.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Hold<br />
|itemName=hold<br />
|parName=right<br />
|itemSummary=Hold the current value of the channel.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Slope<br />
|itemName=slope<br />
|parName=right<br />
|itemSummary=Continue the slope after the end of the channel.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Cycle<br />
|itemName=cycle<br />
|parName=right<br />
|itemSummary=Cycle the channel repeatedly.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Mirror<br />
|itemName=mirror<br />
|parName=right<br />
|itemSummary=Cycle the channel repeatedly, mirroring every other cycle.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Default Value<br />
|itemName=default<br />
|parName=right<br />
|itemSummary=Use the constant value specified in the Default Value parameter<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=7 <br />
|parSummary=The value used for the Default Value extend condition. <br />
|opType=filein <br />
|parName=defval <br />
|opFamily=CHOP <br />
|parLabel=Default Value <br />
|parType=Float<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=8 <br />
|parSummary=The channel pattern to rename. See [[Pattern Matching]]. <br />
|opType=filein <br />
|parName=renamefrom <br />
|opFamily=CHOP <br />
|parLabel=Rename from <br />
|parItems= <br />
|parType=StrMenu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=9 <br />
|parSummary=The replacement pattern for the names. The default parameters do not rename the channels. See [[Pattern Replacement]]. <br />
|opType=filein <br />
|parName=renameto <br />
|opFamily=CHOP <br />
|parLabel=Rename to <br />
|parItems= <br />
|parType=StrMenu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=10 <br />
|parSummary=Scopes channels to apply the Override Value to. <br />
|opType=filein <br />
|parName=overridpattern <br />
|opFamily=CHOP <br />
|parLabel=Value Override Pattern <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=11 <br />
|parSummary=The value given to channels scope by the Value Override Pattern parameter above. <br />
|opType=filein <br />
|parName=overridevalue <br />
|opFamily=CHOP <br />
|parLabel=Override Value <br />
|parType=Float<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=12 <br />
|parSummary=Reload the file when this parameter is set to On.<br />
|opType=filein <br />
|parName=refresh <br />
|opFamily=CHOP <br />
|parLabel=Refresh <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|parOrder=13 <br />
|parSummary=Instantly reload the file from disk. <br />
|opType=filein <br />
|parName=refreshpulse <br />
|opFamily=CHOP <br />
|parLabel=Refresh Pulse <br />
|parType=Pulse<br />
|parReadOnly= <br />
|parItems=}} <br />
<br />
}} <br />
{{:CHOP Generator Common Page <br />
}} <br />
<br />
{{InfoCHOPChannels<br />
|opFamily=CHOP<br />
|opLabel=File In<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{CHOPNavBox <br />
|opFamily=CHOP <br />
}} <br />
{{#invoke:Category <br />
|list|CHOPs}}</div>Robhttps://docs.derivative.ca/index.php?title=OP_Class&diff=28447OP Class2023-03-17T14:45:27Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=OP|summary=The OP class defines a reference to a single [[Operator|operator]].}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{SubSection|title=General<br />
|text=<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=valid<br />
|type=bool<br />
|set=0<br />
|text=True if the referenced operator currently exists, False if it has been deleted.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=id<br />
|type=int<br />
|set=0<br />
|text=Unique id for the operator. This id can also be passed to the op() and ops() methods. Id's are not consistent when a file is re-opened, and will change if the OP is copied/pasted, changes OP types, deleted/undone. The id will not change if the OP is renamed though. Its data type is integer.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=name<br />
|type=str<br />
|set=1<br />
|text=Get or set the operator name.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=path<br />
|type=str<br />
|set=0<br />
|text=Full path to the operator.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=digits<br />
|type=int<br />
|set=0<br />
|text=Returns the numeric value of the last consecutive group of digits in the name, or None if not found. The digits can be in the middle of the name if there are none at the end of the name.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=base<br />
|type=str<br />
|set=0<br />
|text=Returns the beginning portion of the name occurring before any digits.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=passive<br />
|type=bool<br />
|set=0<br />
|text=If true, operator will not cook before its access methods are called. To use a passive version of an operator n, use passive(n).<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=curPar<br />
|type=td.Par<br />
|set=0<br />
|text=The parameter currently being evaluated. Can be used in a parameter expression to reference itself.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=time<br />
|type=OP<br />
|set=0<br />
|text=[[timeCOMP Class|Time Component]] that defines the operator's time reference.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=ext<br />
|type=class<br />
|set=0<br />
|text=The object to search for parent [[Extensions|extensions]].<br />
<syntaxhighlight lang=python><br />
me.ext.MyClass<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=OP<br />
|name=mod<br />
|type=mod<br />
|set=0<br />
|text=Get a [[MOD Class|module on demand]] object that searches for DAT modules relative to this operator.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=pages<br />
|type=list<br />
|set=0<br />
|text=A list of all built-in pages.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=parGroup<br />
|type=tuple<br />
|set=0<br />
|text=An intermediate [[ParGroupCollection Class|parameter collection]] object, from which a specific [[ParGroup Class|parameter group]] can be found.<br />
<syntaxhighlight lang=python><br />
n.parGroup.t<br />
# or<br />
n.parGroup['t']<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=OP<br />
|name=par<br />
|type=td.Par<br />
|set=0<br />
|text=An intermediate [[ParCollection Class|parameter collection]] object, from which a specific [[Par Class|parameter]] can be found.<br />
<syntaxhighlight lang=python><br />
n.par.tx<br />
# or<br />
n.par['tx']<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=OP<br />
|name=builtinPars<br />
|type=list or par<br />
|set=0<br />
|text=A list of all [[Par Class|built-in parameters]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=customParGroups<br />
|type=list of parGroups<br />
|set=0<br />
|text=A list of all [[ParGroup Class|ParGroups]], where a ParGroup is a set of parameters all drawn on the same line of a dialog, sharing the same label.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=customPars<br />
|type=list of par<br />
|set=0<br />
|text=A list of all [[Par Class|custom parameters]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=customPages<br />
|type=list<br />
|set=0<br />
|text=A list of all [[Page Class|custom pages]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=customTuplets<br />
|deprecated=True<br />
|type=list<br />
|set=0<br />
|text=A list of all parameter tuplets, where a tuplet is a set of parameters all drawn on the same line of a dialog, sharing the same label.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=replicator<br />
|type=OP or None<br />
|set=0<br />
|text=The [[replicatorCOMP Class|replicatorCOMP]] that created this operator, if any.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=storage<br />
|type=dict<br />
|set=0<br />
|text=[[Storage]] is dictionary associated with this operator. Values stored in this dictionary are persistent, and saved with the operator. The dictionary attribute is read only, but not its contents. Its contents may be manipulated directly with methods such as OP.fetch() or OP.store() described below, or examined with an [[Examine DAT]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=tags<br />
|type=list<br />
|set=1<br />
|text=Get or set a set of user defined strings. [[Tag|Tags]] can be searched using OP.findChildren() and the [[OP Find DAT]].<br />
The set is a regular python set, and can be accessed accordingly:<br />
<syntaxhighlight lang=python><br />
n.tags = ['effect', 'image filter']<br />
n.tags.add('darken')<br />
</syntaxhighlight>}}<br />
{{ClassMember<br />
|class=OP<br />
|name=children<br />
|type=list<br />
|set=0<br />
|text=A list of [[OP Class|operators]] contained within this operator. Only [[COMP Class|component]] operators have children, otherwise an empty list is returned.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=numChildren<br />
|type=int<br />
|set=0<br />
|text=Returns the number of children contained within the operator. Only [[COMP Class|component]] operators have children.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=numChildrenRecursive<br />
|type=int<br />
|set=0<br />
|text=Returns the number of operators contained recursively within this operator. Only [[COMP Class|component]] operators have children.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=op<br />
|type=OP or None<br />
|set=0<br />
|text=The operator finder object, for accessing operators through paths or shortcuts. '''Note:''' a version of this method that searches relative to '/' is also in the global [[td Module|td module]].<br />
<br />
<code>'''op(pattern1, pattern2..., includeUtility=False)'''</code> &rarr; <code class="return">[[OP Class|OP]] or None</code><br />
<blockquote><br />
Returns the first OP whose path matches the given pattern, relative to the inside of this operator. Will return None if nothing is found. Multiple patterns may be specified which are all added to the search. Numeric OP ids may also be used.<br />
* <code>pattern</code> - 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.<br />
* <code>includeUtility</code> '''(Optional)''' - if True, allow [[Network_Utilities:_Comments,_Network_Boxes,_Annotates|Utility nodes]] to be returned. If False, Utility operators will be ignored.<br />
<br />
<syntaxhighlight lang=python><br />
b = op('project1')<br />
b = op('foot*', 'hand*') #comma separated<br />
b = op('foot* hand*') #space separated<br />
b = op(154)<br />
</syntaxhighlight><br />
</blockquote><br />
<code>'''op.shortcut'''</code> &rarr; <code>OP</code><br />
<blockquote><br />
:An operator specified with by a [[Global OP 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.<br />
:*<code>shortcut</code> - Corresponds to the Global OP Shortcut parameter specified in the target operator.<br />
<syntaxhighlight lang=python><br />
b = op.Videoplayer <br />
</syntaxhighlight><br />
To list all Global OP Shortcuts:<br />
<syntaxhighlight lang=python><br />
for x in op:<br />
print(x)<br />
</syntaxhighlight><br />
</blockquote>}}<br />
{{ClassMember<br />
|class=OP<br />
|name=parent<br />
|type=OP<br />
|set=0<br />
|text=The [[Parent Shortcut|Parent Shortcut]] object, for accessing parent components through indices or shortcuts.<br />
'''Note:''' ''a version of this method that searches relative to the current operator is also in the global [[td Module|td module]].''<br />
<br />
<code class="python">parent(n)</code> &rarr; <code class="return">OP or None</code><br />
<blockquote><br />
The nth parent of this 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.<br />
*n - (Optional) n is the number of levels up to climb. When n = 1 it will return the operator's parent.<br />
<syntaxhighlight lang=python><br />
p = parent(2) #grandfather<br />
</syntaxhighlight><br />
</blockquote><br />
<code class="python">parent.shortcut</code> &rarr; <code class="return">OP</code><br />
<blockquote><br />
A parent component specified with a shortcut. If no parent exists an exception is raised.<br />
*shortcut - Corresponds to the [[Parent Shortcut]] parameter specified in the target parent.<br />
<syntaxhighlight lang=python><br />
n = parent.Videoplayer<br />
</syntaxhighlight><br />
See also Parent Shortcut for more examples.</blockquote>}}<br />
{{ClassMember<br />
|class=OP<br />
|name=iop<br />
|type=OP<br />
|set=0<br />
|text=The Internal Operator Shortcut object, for accessing internal shortcuts. See also [[Internal Operators]].<br />
<br />
'''Note:''' a version of this method that searches relative to the current operator is also in the global [[td Module]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=ipar<br />
|type=OP<br />
|set=0<br />
|text=The Internal Operator Parameter Shortcut object, for accessing internal shortcuts. See also [[Internal Parameters]].<br />
<br />
'''Note:''' a version of this method that searches relative to the current operator is also in the global [[td Module]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=currentPage<br />
|type=[[Page Class|Page]]<br />
|set=1<br />
|text=Get or set the currently displayed parameter page. It can be set by setting it to another page or a string label.<br />
<syntaxhighlight lang=python>n.currentPage = 'Common'</syntaxhighlight><br />
}}<br />
{{SubSection|title=Common Flags<br />
|text=The following methods get or set specific operator [[Flag|Flags]]. Note specific operators may contain other flags not in this section.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=activeViewer<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Viewer Active Flag]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=allowCooking<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Cooking Flag]]. Only COMPs can disable this flag.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=bypass<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Bypass Flag]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=cloneImmune<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Immune Flag|Clone Immune Flag]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=current<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Current Flag]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=display<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Display Flag]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=expose<br />
|type=bool<br />
|set=1<br />
|text=Get or set the [[Expose Flag]] which hides a node from view in a network.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=lock<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Lock Flag]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=selected<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Selected Flag]]. This controls if the node is part of the network selection. (yellow box around it).}}<br />
{{ClassMember<br />
|class=OP<br />
|name=python<br />
|type=bool<br />
|set=1<br />
|text=Get or set parameter expression language as python.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=render<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Render Flag]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=showCustomOnly<br />
|type=bool<br />
|set=1<br />
|text=Get or set the Show Custom Only Flag which controls whether or not non custom parameters are display in[[Parameter Dialog | parameter dialogs]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=showDocked<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Docking|Show Docked Flag]]. This controls whether this node is visible or hidden when it is docked to another node.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=viewer<br />
|type=bool<br />
|set=1<br />
|text=Get or set [[Viewer Flag]].}}<br />
{{SubSection|title=Appearance<br />
|text=<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=color<br />
|type=tuple(r, g, b)<br />
|set=1<br />
|text=Get or set color value, expressed as a 3-tuple, representing its red, green, blue values. To convert between color spaces, use the built in colorsys module.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=comment<br />
|type=str<br />
|set=1<br />
|text=Get or set comment string.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=nodeHeight<br />
|type=int<br />
|set=1<br />
|text=Get or set node height, expressed in [[NetworkEditor Class|network editor]] units.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=nodeWidth<br />
|type=int<br />
|set=1<br />
|text=Get or set node width, expressed in [[NetworkEditor Class|network editor]] units.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=nodeX<br />
|type=int<br />
|set=1<br />
|text=Get or set node X value, expressed in [[NetworkEditor Class|network editor]] units, measured from its left edge.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=nodeY<br />
|type=int<br />
|set=1<br />
|text=Get or set node Y value, expressed in [[NetworkEditor Class|network editor]] units, measured from its bottom edge.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=nodeCenterX<br />
|type=int<br />
|set=1<br />
|text=Get or set node X value, expressed in [[NetworkEditor Class|network editor]] units, measured from its center.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=nodeCenterY<br />
|type=int<br />
|set=1<br />
|text=Get or set node Y value, expressed in [[NetworkEditor Class|network editor]] units, measured from its center.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=dock<br />
|type=OP<br />
|set=1<br />
|text=Get or set the [[OP Class|operator]] this operator is docked to. To clear docking, set this member to None.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=docked<br />
|type=list<br />
|set=0<br />
|text=The (possibly empty) list of [[OP Class|operators]] docked to this node.}}<br />
{{SubSection|title=Connection<br />
|text=See also the <code>OP.parent</code> methods. To connect components together see [[COMP_Class#Connection]] section.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=inputs<br />
|type=list<br />
|set=0<br />
|text=List of input [[OP Class|operators]] (via left side connectors) to this operator. To get the number of inputs, use len(OP.inputs).}}<br />
{{ClassMember<br />
|class=OP<br />
|name=outputs<br />
|type=list<br />
|set=0<br />
|text=List of output [[OP Class|operators]] (via right side connectors) from this operator.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=inputConnectors<br />
|type=list<br />
|set=0<br />
|text=List of input [[Connector Class|connectors]] (on the left side) associated with this operator.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=outputConnectors<br />
|type=list<br />
|set=0<br />
|text=List of output [[Connector Class|connectors]] (on the right side) associated with this operator.}}<br />
{{SubSection|title=Cook Information<br />
|text=<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=cookFrame<br />
|type=float<br />
|set=0<br />
|text=Last frame at which this operator cooked.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=cookTime<br />
|type=float<br />
|set=0<br />
|text='''Deprecated''' Duration of the last measured cook (in milliseconds).<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=cpuCookTime<br />
|type=float<br />
|set=0<br />
|text=Duration of the last measured cook in CPU time (in milliseconds).<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=cookAbsFrame<br />
|type=float<br />
|set=0<br />
|text=Last absolute frame at which this operator cooked.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=cookStartTime<br />
|type=float<br />
|set=0<br />
|text=Last offset from frame start at which this operator cook began, expressed in milliseconds.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=cookEndTime<br />
|type=float<br />
|set=0<br />
|text=Last offset from frame start at which this operator cook ended, expressed in milliseconds. Other operators may have cooked between the start and end time. See the cookTime member for this operator's specific cook duration.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=cookedThisFrame<br />
|type=bool<br />
|set=0<br />
|text=True when this operator has cooked this frame.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=cookedPreviousFrame<br />
|type=bool<br />
|set=0<br />
|text=True when this operator has cooked the previous frame.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=childrenCookTime<br />
|type=float<br />
|set=0<br />
|text='''Deprecated''' The total accumulated cook time of all children of this operator during the last frame. Zero if the operator is not a [[COMP Class|COMP]] and/or has no children.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=childrenCPUCookTime<br />
|type=float<br />
|set=0<br />
|text=The total accumulated cook time of all children of this operator during the last frame. Zero if the operator is not a [[COMP Class|COMP]] and/or has no children.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=childrenCookAbsFrame<br />
|type=float<br />
|set=0<br />
|text='''Deprecated''' The absolute frame on which childrenCookTime is based.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=childrenCPUCookAbsFrame<br />
|type=float<br />
|set=0<br />
|text=The absolute frame on which childrenCPUCookTime is based.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=gpuCookTime<br />
|type=float<br />
|set=0<br />
|text=Duration of GPU operations during the last measured cook (in milliseconds).<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=childrenGPUCookTime<br />
|type=float<br />
|set=0<br />
|text=The total accumulated GPU cook time of all children of this operator during the last frame. Zero if the operator is not a COMP and/or has no children.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=childrenGPUCookAbsFrame<br />
|type=float<br />
|set=0<br />
|text=The absolute frame on which childrenGPUCookTime is based.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=totalCooks<br />
|type=int<br />
|set=0<br />
|text=Number of times the operator has cooked.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=cpuMemory<br />
|type=int<br />
|set=0<br />
|text=The approximate amount of CPU memory this Operator is using, in bytes.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=gpuMemory<br />
|type=int<br />
|set=0<br />
|text=The amount of GPU memory this OP is using, in bytes.<br />
}}<br />
{{SubSection|title=Type<br />
|text=<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=type<br />
|type=str<br />
|set=0<br />
|text=Operator type as a string. Example: 'oscin'.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=subType<br />
|type=str<br />
|set=0<br />
|text=Operator subtype. Currently only implemented for [[Component|components]]. May be one of: 'panel', 'object', or empty string in the case of base components.}}<br />
{{ClassMember<br />
|class=OP<br />
|name=OPType<br />
|type=str<br />
|set=0<br />
|text=Python operator class type, as a string. Example: 'oscinCHOP'. Can be used with COMP.create() method.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=label<br />
|type=str<br />
|set=0<br />
|text=Operator type label. Example: 'OSC In'.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=icon<br />
|type=str<br />
|set=0<br />
|text=Get the letters used to create the operator's icon.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=family<br />
|type=str<br />
|set=0<br />
|text=Operator family. Example: CHOP. Use the global dictionary families for a list of each operator type.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=isFilter<br />
|type=bool<br />
|set=0<br />
|text=True if operator is a filter, false if it is a generator.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=minInputs<br />
|type=int<br />
|set=0<br />
|text=Minimum number of inputs to the operator.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=maxInputs<br />
|type=int<br />
|set=0<br />
|text=Maximum number of inputs to the operator.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=isMultiInputs<br />
|type=bool<br />
|set=0<br />
|text=True if inputs are ordered, false otherwise. Operators with an arbitrary number of inputs have unordered inputs, example [[Merge CHOP]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=visibleLevel<br />
|type=int<br />
|set=0<br />
|text=Visibility level of the operator. For example, expert operators have visibility level 1, regular operators have visibility level 0.<br />
}}<br />
{{ClassMember<br />
|class=OP<br />
|name=isBase<br />
|type=bool<br />
|set=0<br />
|text=True if the operator is a Base (miscellaneous) [[Component|component]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=isCHOP<br />
|type=bool<br />
|set=0<br />
|text=True if the operator is a [[CHOP]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=isCOMP<br />
|type=bool<br />
|set=0<br />
|text=True if the operator is a [[Component|component]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=isDAT<br />
|type=bool<br />
|set=0<br />
|text=True if the operator is a [[DAT]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=isMAT<br />
|type=bool<br />
|set=0<br />
|text=True if the operator is a [[MAT|Material]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=isObject<br />
|type=bool<br />
|set=0<br />
|text=True if the operator is an [[object]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=isPanel<br />
|type=bool<br />
|set=0<br />
|text=True if the operator is a [[Panel]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=isSOP<br />
|type=bool<br />
|set=0<br />
|text=True if the operator is a [[SOP]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=isTOP<br />
|type=bool<br />
|set=0<br />
|text=True if the operators is a [[TOP]].}}<br />
{{ClassMember<br />
|class=OP<br />
|name=licenseType<br />
|type=str<br />
|set=0<br />
|text=Type of [[License Class|License]] required for the operator.}}}}<br />
{{ClassMethodSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{SubSection|title=General<br />
|text='''NOTE''': <code>create()</code>, <code>copy()</code> and <code>copyOPs()</code> is done by the parent operator (a component). For more information see [[COMP Class#Methods|COMP.create, COMP.copy and COMP.copyOPs methods]].<br />
<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=pars<br />
|call=pars(pattern)<br />
|returns=list<br />
|text=Returns a (possibly empty) list of [[Par Class|parameter objects]] that match the pattern.<br />
*pattern - Is a string following the [[Pattern Matching]] rules, specifying which parameters to return.<br />
<syntaxhighlight lang=python><br />
newlist = op('geo1').pars('t?', 'r?', 's?') #translate/rotate/scale parameters<br />
</syntaxhighlight>Note: If searching for a single parameter given a name, it's much more efficient to use the subscript operator. For example:<syntaxhighlight>name = 'MyName1'<br />
op('geo1').par[name]</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=cook<br />
|call=cook(force=False, recurse=False, includeUtility=False)<br />
|returns=None<br />
|text=Cook the contents of the operator if required.<br />
*force - (Keyword, Optional) If True, the operator will always cook, even if it wouldn't under normal circumstances.<br />
*recurse - (Keyword, Optional) If True, all children and sub-children of the operator will be cooked.<br />
*includeUtility - (Keyword, Optional) If specified, controls whether or not utility components (eg Comments) are included in the results.<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=copyParameters<br />
|call=copyParameters(OP, custom=True, builtin=True)<br />
|returns=None<br />
|text=Copy all of the parameters from the specified [[OP Class|operator]]. Both operators should be the same type.<br />
*OP - The operator to copy.<br />
*custom - (Keyword, Optional) When True, custom parameters will be copied. <br />
*builtin - (Keyword, Optional) When True, built in parameters will be copied.<br />
<syntaxhighlight lang=python><br />
op('geo1').copyParameters( op('geo2') )<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=changeType<br />
|call=changeType(OPtype)<br />
|returns=OP<br />
|text=Change referenced operator to a new operator type. After this call, this OP object should no longer be referenced. Instead use the returned OP object.<br />
*OPtype - The python class name of the operator type you want to change this operator to. This is not a string, but instead is a class defined in the global [[td Module|td module]].<br />
<syntaxhighlight lang=python><br />
n = op('wave1').changeType(nullCHOP) #changes 'wave1' into a Null CHOP<br />
n = op('text1').changeType(tcpipDAT) #changes 'text1' operator into a TCPIP DAT<br />
</syntaxhighlight>}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=dependenciesTo<br />
|call=dependenciesTo(OP)<br />
|returns=list<br />
|text=Returns a (possibly empty) list of operator dependency paths between this operator and the specified operator. Multiple paths may be found.<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=evalExpression<br />
|call=evalExpression(str)<br />
|returns=value<br />
|text=Evaluate the expression from the context of this OP. Can be used to evaluate arbitrary snippets of code from arbitrary locations. <br />
*str - The expression to evaluate.<br />
<syntaxhighlight lang=python><br />
op('wave1').evalExpression('me.digits') #returns 1<br />
</syntaxhighlight><br />
If the expression already resides in a parameter, use that parameters [[Par Class|evalExpression()]] method instead.}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=destroy<br />
|call=destroy()<br />
|returns=None<br />
|text=Destroy the operator referenced by this OP. An exception will be raised if the OP's operator has already been destroyed.<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=var<br />
|call=var(name, search=True)<br />
|returns=str<br />
|text=Evaluate a[[Variables | variable]]. This will return the empty string, if not found. Most information obtained from variables (except for Root and Component variables) are accessible through other means in Python, usually in the global [[td Module|td module]].<br />
*name - The variable name to search for.<br />
*search - (Keyword, Optional) If set to True (which is default) the operator hierarchy is searched until a variable matching that name is found. If false, the search is constrained to the operator.}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=openMenu<br />
|call=openMenu(x=None, y=None)<br />
|returns=None<br />
|text=Open a node menu for the operator at x, y. Opens at mouse if x & y are not specified.<br />
*x - (Keyword, Optional) The X coordinate of the menu, measured in screen pixels.<br />
*y - (Keyword, Optional) The Y coordinate of the menu, measured in screen pixels. <br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=relativePath<br />
|call=relativePath(OP)<br />
|returns=str<br />
|text=Returns the relative path from this operator to the OP that is passed as the argument. See OP.shortcutPath for a version using expressions.}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=setInputs<br />
|call=setInputs(listOfOPs)<br />
|returns=None<br />
|text=Set all the operator inputs to the specified list.<br />
* listOfOPs - A list containing one or more OPs. Entries in the list can be None to disconnect specific inputs. An empty list disconnects all inputs.}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=shortcutPath<br />
|call=shortcutPath(OP, toParName=None)<br />
|returns=str<br />
|text=Returns an expression from this operator to the OP that is passed as the argument. See OP.relativePath for a version using relative path constants.<br />
* toParName - (Keyword, Optional) Return an expression to this parameter instead of its operator.}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=ops<br />
|call=ops(pattern1, pattern2.., includeUtility=False)<br />
|returns=list of OPs<br />
|text=Returns a (possibly empty) list of OPs that match the patterns, relative to the inside of this OP.<br />
Multiple patterns may be provided. Numeric OP ids may also be used.<br />
*pattern - Can be string following the [[Pattern Matching]] rules, specifying which OPs to return, or an integer, which must be an OP Id. Multiple patterns can be given and all matched OPs will be returned.<br />
*includeUtility - (Keyword, Optional) If specified, controls whether or not utility components (eg Comments) are included in the results.<br />
'''Note:''' a version of this method that searches relative to '/' is also in the global [[td Module|td module]].<br />
<syntaxhighlight lang=python><br />
newlist = n.ops('arm*', 'leg*', 'leg5/foot*')<br />
</syntaxhighlight>}}<br />
{{SubSection|title=Errors<br />
|text=<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=addScriptError<br />
|call=addScriptErrors(msg)<br />
|returns=None<br />
|text=Adds a script error to a node.<br />
*msg - The error to add.<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=addError<br />
|call=addError(msg)<br />
|returns=None<br />
|text=Adds an error to an operator. Only valid if added while the operator is cooking. (Example Script SOP, CHOP, DAT).<br />
*msg - The error to add.<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=addWarning<br />
|call=addWarning(msg)<br />
|returns=None<br />
|text=Adds a warning to an operator. Only valid if added while the operator is cooking. (Example Script SOP, CHOP, DAT).<br />
*msg - The error to add.<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=errors<br />
|call=errors(recurse=False)<br />
|returns=str<br />
|text=Get error messages associated with this OP.<br />
*recurse - Get errors in any children or subchildren as well.<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=warnings<br />
|call=warnings(recurse=False)<br />
|returns=str<br />
|text=Get warning messages associated with this OP.<br />
*recurse - Get warnings in any children or subchildren as well.<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=scriptErrors<br />
|call=scriptErrors(recurse=False)<br />
|returns=str<br />
|text=Get script error messages associated with this OP.<br />
*recurse - Get errors in any children or subchildren as well.<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=clearScriptErrors<br />
|call=clearScriptErrors(recurse=False, error='*')<br />
|returns=None<br />
|text=Clear any errors generated during script execution. These may be generated during execution of DATs, Script Nodes, Replicator COMP callbacks, etc.<br />
*recurse - Clear script errors in any children or subchildren as well.<br />
*error - Pattern to match when clearing errors<br />
<syntaxhighlight lang=python><br />
op('/project1').clearScriptErrors(recurse=True)<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=childrenCPUMemory<br />
|call=childrenCPUMemory()<br />
|returns=int<br />
|text=Returns the total CPU memory usage for all the children from this COMP.}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=childrenGPUMemory<br />
|call=childrenGPUMemory()<br />
|returns=int<br />
|text=Returns the total GPU memory usage for all the children from this COMP.}} <br />
{{SubSection|title=Appearance<br />
|text=<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=resetNodeSize<br />
|call=resetNodeSize()<br />
|returns=None<br />
|text=Reset the node tile size to its default width and height.<br />
}}<br />
{{SubSection|title=Viewers<br />
|text=<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=closeViewer<br />
|call=closeViewer(topMost=False)<br />
|returns=None<br />
|text=Close the floating content viewers of the OP.<br />
*topMost - (Keyword, Optional) If True, any viewer window containing any parent of this OP is closed instead.<br />
<syntaxhighlight lang=python><br />
op('wave1').closeViewer()<br />
op('wave1').closeViewer(topMost=True) # any viewer that contains 'wave1' will be closed.<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=openViewer<br />
|call=openViewer(unique=False, borders=True)<br />
|returns=None<br />
|text=Open a floating content viewer for the OP.<br />
*unique - (Keyword, Optional) If False, any existing viewer for this OP will be re-used and popped to the foreground. If unique is True, a new window is created each time instead.<br />
*borders - (Keyword, Optional) If true, the floating window containing the viewer will have borders.<br />
<syntaxhighlight lang=python><br />
op('geo1').openViewer(unique=True, borders=False) # opens a new borderless viewer window for 'geo1'<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=resetViewer<br />
|call=resetViewer(recurse=False)<br />
|returns=None<br />
|text=Reset the OP content viewer to default view settings.<br />
*recurse - (Keyword, Optional) If True, this is done for all children and sub-children as well.<br />
<syntaxhighlight lang=python><br />
op('/').resetViewer(recurse=True) # reset the viewer for all operators in the entire file.<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=openParameters<br />
|call=openParameters()<br />
|returns=None<br />
|text=Open a floating dialog containing the operator parameters.<br />
}}<br />
{{SubSection|title=Storage<br />
|text=<br />
[[Storage]] can be used to keep data within components. Storage is implemented as one python dictionary per node. <br />
<br />
When an element of storage is changed by using <code>n.store()</code> as explained below, expressions and operators that depend on it will automatically re-cook. It is retrieved with the <code>n.fetch()</code> function.<br />
<br />
Storage is saved in <code>.toe</code> and <code>.tox</code> files and restored on startup.<br />
<br />
Storage can hold any python object type (not just strings as in Tscript variables). Storage elements can also have optional startup values, specified separately. Use these startup values for example, to avoid saving and loading some session specific object, and instead save or load a well defined object like <code>None</code>.<br />
<br />
See the [[Examine DAT]] for procedurally viewing the contents of storage.<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=fetch<br />
|call=fetch(key, default, search=True, storeDefault=False)<br />
|returns=value<br />
|text=Return an object from the OP storage dictionary. If the item is not found, and a default it supplied, it will be returned instead.<br />
*key - The name of the entry to retrieve.<br />
*default - (Optional) If provided and no item is found then the passed value/object is returned instead.<br />
*storeDefault - (Keyword, Optional) If True, and the key is not found, the default is stored as well.<br />
*search - (Keyword, Optional) If True, the parent of each OP is searched recursively until a match is found<br />
<syntaxhighlight lang=python><br />
v = n.fetch('sales5', 0.0)<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=fetchOwner<br />
|call=fetchOwner(key)<br />
|returns=OP<br />
|text=Return the operator which contains the stored key, or None if not found.<br />
*key - The key to the stored entry you are looking for.<br />
<syntaxhighlight lang=python><br />
who = n.fetchOwner('sales5') #find the OP that has a storage entry called 'sales5'<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=store<br />
|call=store(key, value)<br />
|returns=value<br />
|text=Add the key/value pair to the OP's storage dictionary, or replace it if it already exists. If this value is not intended to be saved and loaded in the toe file, it can be be given an alternate value for saving and loading, by using the method storeStartupValue described below.<br />
*key - A string name for the storage entry. Use this name to retrieve the value using fetch().<br />
*value - The value/object to store.<br />
<syntaxhighlight lang=python><br />
n.store('sales5', 34.5) # stores a floating point value 34.5.<br />
n.store('moviebank', op('/project1/movies')) # stores an OP for easy access later on.<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=unstore<br />
|call=unstore(keys1, keys2..)<br />
|returns=None<br />
|text=For key, remove it from the OP's storage dictionary. Pattern Matching is supported as well.<br />
*keys - The name or pattern defining which key/value pairs to remove from the storage dictionary.<br />
<syntaxhighlight lang=python><br />
n.unstore('sales*') # removes all entries from this OPs storage that start with 'sales'<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=storeStartupValue<br />
|call=storeStartupValue(key, value)<br />
|returns=None<br />
|text=Add the key/value pair to the OP's storage startup dictionary. The storage element will take on this value when the file starts up.<br />
*key - A string name for the storage startup entry.<br />
*value - The startup value/object to store.<br />
<syntaxhighlight lang=python><br />
n.storeStartupValue('sales5', 1) # 'sales5' will have a value of 1 when the file starts up.<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=unstoreStartupValue<br />
|call=unstoreStartupValue(keys1, keys2..)<br />
|returns=None<br />
|text=For key, remove it from the OP's storage startup dictionary. Pattern Matching is supported as well. This does not affect the stored value, just its startup value.<br />
*keys - The name or pattern defining which key/value pairs to remove from the storage startup dictionary.<br />
<syntaxhighlight lang=python><br />
n.unstoreStartupValue('sales*') # removes all entries from this OPs storage startup that start with 'sales'<br />
</syntaxhighlight><br />
}}<br />
{{SubSection|title=Miscellaneous<br />
|text=<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=__getstate__<br />
|call=__getstate__()<br />
|returns=dict<br />
|text=Returns a dictionary with persistent data about the object suitable for pickling and deep copies.<br />
}}<br />
{{ClassMethod<br />
|class=OP<br />
|name=__setstate__<br />
|call=__setstate__()<br />
|returns=dict<br />
|text=Reads the dictionary to update persistent details about the object, suitable for unpickling and deep copies.<br />
}}<br />
}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=Licenses_Class&diff=28353Licenses Class2023-03-03T18:16:50Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=Licenses|summary=The Licenses class describes the set of all installed [[License Class|license objects]]. It can be accessed with the licenses object, , found in the automatically imported [[td Module|td module]].<br />
<syntaxhighlight lang=python><br />
print(len(licenses)) # number of licenses <br />
print(licenses[0]) # first license in the list<br />
for l in licenses:<br />
print(l.type) # print all installed licenses' types<br />
</syntaxhighlight><br />
}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
<br />
{{ClassMember<br />
|class=Licenses<br />
|name=disablePro<br />
|type=bool<br />
|set=1<br />
|text=When True, the application will run as though no Pro licenses are available. This can be used to test compatibility with lesser licenses. (See also: [[App Class#Methods|app.addNonCommercialLimit]])<br />
}}<br />
{{ClassMember<br />
|class=Licenses<br />
|name=dongles<br />
|type=list<br />
|set=0<br />
|text=Get the list of dongles connected to the system.<br />
}}<br />
{{ClassMember<br />
|class=Licenses<br />
|name=machine<br />
|type=str<br />
|set=0<br />
|text=The computer machine name.<br />
}}<br />
{{ClassMember<br />
|class=Licenses<br />
|name=systemCode<br />
|type=str<br />
|set=0<br />
|text=The unique computer system code.<br />
}}<br />
{{ClassMember<br />
|class=Licenses<br />
|name=isPro<br />
|type=bool<br />
|set=0<br />
|text=When True, the application is running with a Pro license. It is recommended to use this and isNonCommerical over the type method.}}<br />
{{ClassMember<br />
|class=Licenses<br />
|name=isNonCommercial<br />
|type=bool<br />
|set=0<br />
|text=When True, the application is running with a Non-Commercial license. It is recommended to use this and isPro over the type method.}}<br />
{{ClassMember<br />
|class=Licenses<br />
|name=type<br />
|type=str<br />
|set=0<br />
|text=The highest ranking license type of all installed licenses, some products being 'Pro', 'Non-Commercial', 'Commercial'. See also app.product in [[App Class]].}}}}<br />
{{ClassMethodSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
<br />
{{ClassMethod<br />
|class=Licenses<br />
|name=install<br />
|call=install(key)<br />
|returns=bool<br />
|text=Install a [[License Class|license]] with the specified key. Returns True if successful.}}}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=App_Class&diff=28337App Class2023-02-28T21:20:50Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=App|summary=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|td module]].<br />
<br />
'''NOTE:''' See also [[Variables]] and Dialogs -> Variables where more built-in paths and strings are available via expressions in the form <code>var('DESKTOP')</code>, <code>var('MYDOCUMENTS')</code> and <code>var('TOENAME')</code>.}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|class=App<br />
|name=architecture<br />
|type=str<br />
|set=0<br />
|text=The architecture of the compile. Generally 32 or 64 bit.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=binFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing the binaries.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=build<br />
|type=str<br />
|set=0<br />
|text=Application build number.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=compileDate<br />
|type=tuple(year, month, day)<br />
|set=0<br />
|text=The date the application was compiled, expressed as a tuple (year, month, day).<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=configFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing configuration files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=desktopFolder<br />
|type=str<br />
|set=0<br />
|text=Current user's desktop folder.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=enableOptimizedExprs<br />
|type=bool<br />
|set=1<br />
|text=Get or set if Python expression optimization is enabled. Defaults to True every time TouchDesigner starts.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=experimental<br />
|type=bool<br />
|set=0<br />
|text=Returns true if the App is an experimental build, false otherwise.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=installFolder<br />
|type=str<br />
|set=0<br />
|text=Main installation folder.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=launchTime<br />
|type=float<br />
|set=0<br />
|text=Total time required to launch and begin playing the toe file, measured in seconds.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=logExtensionCompiles<br />
|type=bool<br />
|set=1<br />
|text=Get or set if extra messages for starting and ending compiling extensions is sent to the textport. Additional error stack will be printed if compilation fails. Defaults to False every time TouchDesigner starts.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=osName<br />
|type=str<br />
|set=0<br />
|text=The operating system name.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=osVersion<br />
|type=str<br />
|set=0<br />
|text=The operating system version.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=power<br />
|type=bool<br />
|set=1<br />
|text=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.<br />
<syntaxhighlight lang=python><br />
app.power = False #turn off the power button.<br />
</syntaxhighlight><br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=preferencesFolder<br />
|type=str<br />
|set=0<br />
|text=Folder where the preferences file is located.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=product<br />
|type=str<br />
|set=0<br />
|text=Application name. For example, 'TouchDesigner', 'TouchPlayer'. See also licences.type in [[Licenses Class]].}}<br />
{{ClassMember<br />
|class=App<br />
|name=recentFiles<br />
|type=list<br />
|set=1<br />
|text=Get or set the list of most recently saved or loaded files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=samplesFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing configuration files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=paletteFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing palette files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=userPaletteFolder<br />
|type=str<br />
|set=0<br />
|text=Folder where custom user palettes are located.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=version<br />
|type=str<br />
|set=0<br />
|text=Application version number.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=windowColorBits<br />
|type=int<br />
|set=0<br />
|text=The number of color bits per color channel the TouchDesigner window is running at. By default this will be 8-bits per channel, but can be increased to 10-bits by settings env var TOUCH_10_BIT_COLOR=1. Only works on displays that support 10-bit color.<br />
}}}}<br />
{{ClassMethodSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|class=App<br />
|name=addNonCommercialLimit<br />
|call=addNonCommercialLimit(password)<br />
|returns=None<br />
|text=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. (See also [[Licenses Class|licenses.disablePro]]) member.<br />
*password - (Keyword, Optional) Password to later remove the restriction.<br />
<syntaxhighlight lang=python><br />
app.addNonCommercialLimit('secret123') #undoable with password<br />
app.addNonCommercialLimit() #permanent during length of session.<br />
</syntaxhighlight><br />
}} <br />
{{ClassMethod<br />
|class=App<br />
|name=removeNonCommercialLimit<br />
|call=removeNonCommercialLimit(password)<br />
|returns=bool<br />
|text=Removes the restriction previously added. Returns True if successful.<br />
*password - (Keyword) Password previously used when restriction added.<br />
<syntaxhighlight lang=python><br />
app.removeNonCommercialLimit('secret123')<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=App<br />
|name=addResolutionLimit<br />
|call=addResolutionLimit(x,y password)<br />
|returns=None<br />
|text=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.<br />
*x - Width of maximum texture resolution, measured in pixels.<br />
*y - Height of maximum texture resolution, measured in pixels.<br />
*password - (Keyword, Optional) Password to later remove the restriction.<br />
<syntaxhighlight lang=python><br />
app.addResolutionLimit(600, 480, 'secret123') #undoable with password<br />
app.addResolutionLimit() #permanent during length of session.<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=App<br />
|name=removeResolutionLimit<br />
|call=removeResolutionLimit(password)<br />
|returns=bool<br />
|text=Removes the restriction previously added. Returns True if successful.<br />
*password - (Keyword) Password previously used when restriction added.<br />
<syntaxhighlight lang=python><br />
app.removeResolutionLimit('secret123')<br />
</syntaxhighlight><br />
}}}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=TimerCHOP_Class&diff=28336TimerCHOP Class2023-02-28T21:05:41Z<p>Rob: </p>
<hr />
<div>{{lowercase<br />
}}<br />
{{OPClassSummary<br />
|OPfamily=CHOP<br />
|OPtype=timer<br />
|OPlabel=Timer<br />
}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|class=timerCHOP<br />
|items=<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in frames. 0-based.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginFrame<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in samples. 0-based.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginSample<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in seconds.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginSeconds<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the cumulative time expressed in frames. See <code>.cumulativeSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=cumulativeFrames<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the cumulative time expressed in samples. See <code>.cumulativeSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=cumulativeSample<br />
|deprecated=True<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the cumulative time expressed in samples. See <code>.cumulativeSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=cumulativeSamples<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the cumulative time expressed in seconds. It counts from 0 when you Start. Unlike <code>.runningSeconds</code>, it is slowed/sped by the Speed parameter, and paused by the Play parameter. It continues to increase if there is any looping, jumping or scrubbing around.<br />
|type=float<br />
|class=timerCHOP<br />
|name=cumulativeSeconds<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the cumulative time as a timecode in the form 00:00:00.00. See <code>.cumulativeSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=cumulativeTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in frames. 0-based. See <code>.masterSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=masterFrames<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in frames. 0-based. See <code>.masterSeconds</code>.<br />
|type=int<br />
|deprecated=True<br />
|class=timerCHOP<br />
|name=masterFrame<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in samples. See <code>.masterSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=masterSamples<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in samples. See <code>.masterSeconds</code>.<br />
|type=int<br />
|deprecated=True<br />
|class=timerCHOP<br />
|name=masterSample<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in seconds. It counts from 0 when you Start, <code>.masterSeconds</code> is slowed/sped by the Speed parameter, and paused by the Play parameter. It jumps to the appropriate time when you scrub. This is the main clock in the Timer CHOP and can be set directly using python (<code>OP.masterSeconds = ''val''</code>), or use the <code>.goTo()</code> function which has more options. When multi-segments are specified to the Timer CHOP, it reflects the time as if you ran through the segments without interrupting it. If in any segment Cycle is on and Cycle Limit is off, it calculates as if the cycle runs only once.<br />
|type=float<br />
|class=timerCHOP<br />
|name=masterSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in fractional form. See <code>.masterSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=masterFraction<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed as a timecode in the form 00:00:00.00. See <code>.masterSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=masterTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the cycle index of the current segment.<br />
|type=float<br />
|class=timerCHOP<br />
|name=cycle<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the time index in fractional form, same as the <code>timer_fraction</code> channel. Used in the callbacks, it's more up-to-date to the current frame. (When using segments, it's the first segment).<br />
|type=float<br />
|class=timerCHOP<br />
|name=fraction<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the playing time expressed in frames. 0-based. See <code>.playingSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=playingFrames<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the playing time expressed in samples. See <code>.playingSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=playingSample<br />
|deprecated=True<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the playing time expressed in samples. See <code>.playingSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=playingSamples<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the playing time expressed in seconds. It counts from 0 when you Start. it is unaffected by the Speed parameter, but unlike <code>.runningSeconds</code>, it is paused by the Play parameter. It continues to increase if there is any looping, jumping or scrubbing around.<br />
|type=float<br />
|class=timerCHOP<br />
|name=playingSeconds<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the playing time as a timecode in the form 00:00:00.00. See <code>.playingSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=playingTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index expressed in fractional form. See <code>.runningSeconds</code>. This will be an estimate as the actual length is approximated on start.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningFraction<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time expressed in frames. 0-based. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningFrames<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time expressed in frames. 0-based. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|deprecated=True<br />
|name=runningFrame<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index expressed in samples. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningSamples<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index expressed in samples. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|deprecated=True<br />
|name=runningSample<br />
}}<br />
<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time expressed in seconds. It keeps counting up after Start and is not affected by changing the Speed or pausing Play or scrubbing. It is basically the "wall clock" after pressing Start. (You normally don't set the value, use <code>.masterSeconds</code>.) It doesn't reset to 0 until you Initialize or Start again.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index as a timecode in the form 00:00:00.00. See <code>.runningSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=runningTimecode<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in frames.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthFrames<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in samples.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthSamples<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in seconds.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthSeconds<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length as a timecode in the form 00:00:00.00.<br />
|type=str<br />
|class=timerCHOP<br />
|name=runningLengthTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the segment index.<br />
|type=float<br />
|class=timerCHOP<br />
|name=segment<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the list of segments.<br />
|type=list<br />
|class=timerCHOP<br />
|name=segments<br />
}}<br />
|empty=<br />
}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|text=Jump to the next segment. Equivalent to pulsing the Go to Next Segment parameter on the Segments Page.<br />
|returns=None<br />
|name=goToNextSegment<br />
|call=goToNextSegment()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Jump to the end of the current cycle. Equivalent to pulsing the Go to End of Cycle parameter on the Timer Page.<br />
|returns=None<br />
|name=goToCycleEnd<br />
|call=goToCycleEnd()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Allows the user to jump to a different time index based on the arguments passed in. Only one unit of time (seconds, frame, sample, fraction) can be specified when calling this method. For example, including both seconds and frame will yield an error. If there are multiple segments, and only a unit of time is specified, the method will jump to the corresponding running time index. If either a segment index or a cycle index or both are specified along with a unit of time, the method will jump to the corresponding local time index. There are fifteen different combinations of arguments that the user can pass in. An example of how this method can be called is: timerop.goTo(segment=1, cycle=2, seconds=5, endOfCycle=True).<br />
*segment - (Keyword, Optional) If specified, will jump to the indicated segment number (0 is first).<br />
*cycle - (Keyword, Optional) If specified, will jump to the indicated cycle number (0 is first).<br />
*endOfCycle - (Keyword, Optional) False by default. If specified as True, the goTo() function with the specified arguments will be called again at the end of the cycle, causing a jump only at that time to the specified location.<br />
*seconds - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify frame, sample, or fraction.<br />
*frame - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, sample, or fraction.<br />
*sample - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, frame, or fraction.<br />
*fraction - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, frame, or sample.<br />
|returns=None<br />
|name=goTo<br />
|call=goTo(segment=num, cycle=num, endOfCycle=True, seconds=num, frame=num, sample=num, fraction=num)<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Jump to the previous segment. Equivalent to pulsing the Go to Previous Segment parameter on the Segments Page.<br />
|returns=None<br />
|name=goToPrevSegment<br />
|call=goToPrevSegment()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Sets the current cycle to be the last cycle of the current segment. Equivalent to pulsing the Exit at End of Cycle parameter on the Timer Page.<br />
|returns=None<br />
|name=lastCycle<br />
|call=lastCycle()<br />
|class=timerCHOP<br />
}}<br />
<br />
|empty=<br />
}}<br />
{{CallbackSection<br />
|text=Note that <code>onTimerPulse()</code> is called when the timer starts counting up, and <code>onSegmentEnter()</code> is called when the segment starts, which is when the delay (if any) starts.<br />
<br />
Note that the <code>onInitialize()</code> return values let you initialize asyncrounously over several frames until you are ready to Start.<br />
|file=TimerCHOP_callbacks.py<br />
}}<br />
{{ClassInheritance<br />
|class=CHOP<br />
}}<br />
{{ClassInheritance<br />
|class=OP<br />
}}<br />
{{History<br />
}}<br />
{{#invoke:Category<br />
|list|CHOP Classes|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=TimerCHOP_Class&diff=28335TimerCHOP Class2023-02-28T20:52:07Z<p>Rob: </p>
<hr />
<div>{{lowercase<br />
}}<br />
{{OPClassSummary<br />
|OPfamily=CHOP<br />
|OPtype=timer<br />
|OPlabel=Timer<br />
}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|class=timerCHOP<br />
|items=<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in frames. 0-based.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginFrame<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in samples. 0-based.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginSample<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in seconds.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginSeconds<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the cumulative time expressed in frames. See <code>.cumulativeSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=cumulativeFrames<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the cumulative time expressed in samples. See <code>.cumulativeSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=cumulativeSample<br />
|deprecated=True<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the cumulative time expressed in samples. See <code>.cumulativeSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=cumulativeSamples<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the cumulative time expressed in seconds. It counts from 0 when you Start. Unlike <code>.runningSeconds</code>, it is slowed/sped by the Speed parameter, and paused by the Play parameter. It continues to increase if there is any looping, jumping or scrubbing around.<br />
|type=float<br />
|class=timerCHOP<br />
|name=cumulativeSeconds<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the cumulative time as a timecode in the form 00:00:00.00. See <code>.cumulativeSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=cumulativeTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in frames. 0-based. See <code>.masterSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=masterFrames<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in frames. 0-based. See <code>.masterSeconds</code>.<br />
|type=int<br />
|deprecated=True<br />
|class=timerCHOP<br />
|name=masterFrame<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in samples. See <code>.masterSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=masterSamples<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in samples. See <code>.masterSeconds</code>.<br />
|type=int<br />
|deprecated=True<br />
|class=timerCHOP<br />
|name=masterSample<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in seconds. It counts from 0 when you Start, <code>.masterSeconds</code> is slowed/sped by the Speed parameter, and paused by the Play parameter. It jumps to the appropriate time when you scrub. This is the main clock in the Timer CHOP and can be set directly using python (<code>OP.masterSeconds = ''val''</code>), or use the <code>.goTo()</code> function which has more options. When multi-segments are specified to the Timer CHOP, it reflects the time as if you ran through the segments without interrupting it. If in any segment Cycle is on and Cycle Limit is off, it calculates as if the cycle runs only once.<br />
|type=float<br />
|class=timerCHOP<br />
|name=masterSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in fractional form. See <code>.masterSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=masterFraction<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed as a timecode in the form 00:00:00.00. See <code>.masterSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=masterTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the cycle index of the current segment.<br />
|type=float<br />
|class=timerCHOP<br />
|name=cycle<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the time index in fractional form, same as the <code>timer_fraction</code> channel. Used in the callbacks, it's more up-to-date to the current frame. (When using segments, it's the first segment).<br />
|type=float<br />
|class=timerCHOP<br />
|name=fraction<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time expressed in frames. 0-based. See <code>.playingSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=playingFrames<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time expressed in samples. See <code>.playingSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=playingSample<br />
|deprecated=True<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time expressed in samples. See <code>.playingSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=playingSamples<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time expressed in seconds. It counts from 0 when you Start. it is unaffected by the Speed parameter, but unlike <code>.runningSeconds</code>, it is paused by the Play parameter. It continues to increase if there is any looping, jumping or scrubbing around.<br />
|type=float<br />
|class=timerCHOP<br />
|name=playingSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time as a timecode in the form 00:00:00.00. See <code>.playingSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=playingTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index expressed in fractional form. See <code>.runningSeconds</code>. This will be an estimate as the actual length is approximated on start.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningFraction<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time expressed in frames. 0-based. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningFrames<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time expressed in frames. 0-based. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|deprecated=True<br />
|name=runningFrame<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index expressed in samples. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningSamples<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index expressed in samples. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|deprecated=True<br />
|name=runningSample<br />
}}<br />
<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time expressed in seconds. It keeps counting up after Start and is not affected by changing the Speed or pausing Play or scrubbing. It is basically the "wall clock" after pressing Start. (You normally don't set the value, use <code>.masterSeconds</code>.) It doesn't reset to 0 until you Initialize or Start again.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index as a timecode in the form 00:00:00.00. See <code>.runningSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=runningTimecode<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in frames.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthFrames<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in samples.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthSamples<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in seconds.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthSeconds<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length as a timecode in the form 00:00:00.00.<br />
|type=str<br />
|class=timerCHOP<br />
|name=runningLengthTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the segment index.<br />
|type=float<br />
|class=timerCHOP<br />
|name=segment<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the list of segments.<br />
|type=list<br />
|class=timerCHOP<br />
|name=segments<br />
}}<br />
|empty=<br />
}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|text=Jump to the next segment. Equivalent to pulsing the Go to Next Segment parameter on the Segments Page.<br />
|returns=None<br />
|name=goToNextSegment<br />
|call=goToNextSegment()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Jump to the end of the current cycle. Equivalent to pulsing the Go to End of Cycle parameter on the Timer Page.<br />
|returns=None<br />
|name=goToCycleEnd<br />
|call=goToCycleEnd()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Allows the user to jump to a different time index based on the arguments passed in. Only one unit of time (seconds, frame, sample, fraction) can be specified when calling this method. For example, including both seconds and frame will yield an error. If there are multiple segments, and only a unit of time is specified, the method will jump to the corresponding running time index. If either a segment index or a cycle index or both are specified along with a unit of time, the method will jump to the corresponding local time index. There are fifteen different combinations of arguments that the user can pass in. An example of how this method can be called is: timerop.goTo(segment=1, cycle=2, seconds=5, endOfCycle=True).<br />
*segment - (Keyword, Optional) If specified, will jump to the indicated segment number (0 is first).<br />
*cycle - (Keyword, Optional) If specified, will jump to the indicated cycle number (0 is first).<br />
*endOfCycle - (Keyword, Optional) False by default. If specified as True, the goTo() function with the specified arguments will be called again at the end of the cycle, causing a jump only at that time to the specified location.<br />
*seconds - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify frame, sample, or fraction.<br />
*frame - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, sample, or fraction.<br />
*sample - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, frame, or fraction.<br />
*fraction - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, frame, or sample.<br />
|returns=None<br />
|name=goTo<br />
|call=goTo(segment=num, cycle=num, endOfCycle=True, seconds=num, frame=num, sample=num, fraction=num)<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Jump to the previous segment. Equivalent to pulsing the Go to Previous Segment parameter on the Segments Page.<br />
|returns=None<br />
|name=goToPrevSegment<br />
|call=goToPrevSegment()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Sets the current cycle to be the last cycle of the current segment. Equivalent to pulsing the Exit at End of Cycle parameter on the Timer Page.<br />
|returns=None<br />
|name=lastCycle<br />
|call=lastCycle()<br />
|class=timerCHOP<br />
}}<br />
<br />
|empty=<br />
}}<br />
{{CallbackSection<br />
|text=Note that <code>onTimerPulse()</code> is called when the timer starts counting up, and <code>onSegmentEnter()</code> is called when the segment starts, which is when the delay (if any) starts.<br />
<br />
Note that the <code>onInitialize()</code> return values let you initialize asyncrounously over several frames until you are ready to Start.<br />
|file=TimerCHOP_callbacks.py<br />
}}<br />
{{ClassInheritance<br />
|class=CHOP<br />
}}<br />
{{ClassInheritance<br />
|class=OP<br />
}}<br />
{{History<br />
}}<br />
{{#invoke:Category<br />
|list|CHOP Classes|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=FlowEmitterCOMP_Class&diff=28333FlowEmitterCOMP Class2023-02-28T20:34:57Z<p>Rob: </p>
<hr />
<div>{{lowercase}}<br />
{{OPClassSummary<br />
|OPfamily=COMP<br />
|OPtype=flowemitter<br />
|OPlabel=Nvidia Flow Emitter}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items=<br />
|empty=True}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items=<br />
|empty=True}}<br />
{{ClassInheritance<br />
|class=COMP}}<br />
{{ClassInheritance<br />
|class=OP}}<br />
{{History}}<br />
{{#invoke:Category<br />
|list<br />
|COMP Classes}}</div>Robhttps://docs.derivative.ca/index.php?title=Group_SOP&diff=28183Group SOP2023-01-30T20:51:04Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opClass=groupSOP_Class <br />
|opType=group <br />
|opLicense=Non-Commercial <br />
|opLabel=Group <br />
|long=The Group SOP generates groups of points or primitives according to various criteria and allows you to act upon these groups. Elements can occur in more than one group. Groups are used in many parts of the SOP Editor to specify which portion(s) of input geometry you wish a SOP to act upon. <br />
<br />
You can also create ordered groups. To do so, check the Ordered button. <br />
|opFilter=True <br />
|opFamily=SOP <br />
|short=The Group SOP generates groups of points or primitives according to various criteria and allows you to act upon these groups. <br />
|opCategories= <br />
}} <br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opType=group <br />
|parOrder=0 <br />
|parLabel=Group Name <br />
|parName=crname <br />
|parSummary=The name of the group to be created. The default name is set to match the name of the SOP.<br />
|opFamily=SOP <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=1 <br />
|parItems=<br />
{{ParameterItem|itemLabel=Primitives <br />
|itemName=primitive <br />
|parName=entity <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Points <br />
|itemName=point <br />
|parName=entity <br />
|itemSummary= <br />
|opFamily=SOP <br />
}} <br />
|parLabel=Entity <br />
|parName=entity <br />
|parSummary=Primitives or Points.<br />
|opFamily=SOP <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opType=group <br />
|parOrder=2 <br />
|parItems= <br />
{{ParameterItem|itemLabel=All Types <br />
|itemName=all <br />
|parName=geotype <br />
|itemSummary=All geometry will be selected.<br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Bezier Curve <br />
|itemName=bezierc <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Bezier Surface <br />
|itemName=bezier <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Circle <br />
|itemName=circle <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Mesh <br />
|itemName=mesh <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Metaball <br />
|itemName=meta <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=NURBS Curve <br />
|itemName=nurbc <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=NURBS Surface <br />
|itemName=nurb <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Particles <br />
|itemName=part <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Polygon <br />
|itemName=poly <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Sphere <br />
|itemName=sphere <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Tube <br />
|itemName=tube <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Triangle Strip <br />
|itemName=tristrip <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Triangle Fan <br />
|itemName=trifan <br />
|parName=geotype <br />
|itemSummary= <br />
|opFamily=SOP <br />
}} <br />
<br />
|parLabel=Geometry Type <br />
|parName=geotype <br />
|parSummary=Select the geometry type group. The selection will only pertain to the geometry type specified. e.g. If you only wanted to group polygons.<br />
|opFamily=SOP <br />
|parType=Menu<br />
|parReadOnly=}}<br />
<br />
|pageName=Group <br />
|opFamily=SOP <br />
|pageSummary= <br />
}}<br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opType=group <br />
|parOrder=0 <br />
|parLabel=Use Number <br />
|parName=usenumber <br />
|parSummary=Allows selection of grouping of entities by number. When the Enable button is Active, the selection options become active and can be used to select entities. The fields available are listed below.<br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=1 <br />
|parLabel=Create Ordered <br />
|parName=ordered <br />
|parSummary=When selected, elements in the group are traversed in the order they are selected; otherwise they are traversed in creation order.<br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=2 <br />
|parItems= <br />
{{ParameterItem|itemLabel=Group by Pattern<br />
|itemName=grppattern<br />
|parName=groupop<br />
|itemSummary=Select a pattern in the Pattern field below.<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Group by Range<br />
|itemName=grprange<br />
|parName=groupop<br />
|itemSummary=Select a Range using the Start/End and Select_of_ fields below.<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Group by Expression<br />
|itemName=grpexpression<br />
|parName=groupop<br />
|itemSummary=Select a range using the Filter Expression field below.<br />
|opFamily=SOP<br />
}} <br />
<br />
|parLabel=Operation <br />
|parName=groupop <br />
|parSummary=When the Number Enable button is checked, this option groups entities based on a defined Pattern or by a Range.<br />
|opFamily=SOP <br />
|parType=Menu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=3 <br />
|parLabel=Pattern <br />
|parName=pattern <br />
|parSummary=Activated when Operation is set to Group by Pattern. In this field, enter the range of primitives to select. The required syntax is "S.P", where S is the index of the parent surface, and P the profile index on that surface. You can mix primitives with profiles in the list. A mixed group is automatically ordered.<br />
<br />
For Example:<br />
*<code>0.4 2 4 2.5 3.7</code> selects three profiles and two primitives,<br />
*<code>0-100:2</code> selects every other number from 0 to 100,<br />
*<code>0-10:2,3</code> selects every two of three,<br />
*<code>0.0-6</code> selects six profiles on primitive 0,<br />
*<code>0.*</code> selects all profiles on primitive 0,<br />
*<code>!4</code> selects every primitive or point except the fourth,<br />
*<code>9-0</code> selects first ten (in reverse if ordered flag is on),<br />
*<code>!0.*</code> selects all profiles except those on primitive 0,<br />
*<code>*</code> selects all primitives or points, and no profiles.<br />
<br />
See [[Pattern Matching]] for details.<br />
|opFamily=SOP <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=4 <br />
|parLabel=Transfer Selection to Pattern <br />
|parName=transfer <br />
|parSummary=This allows you to define the range of points / primitives visually by selecting them in the Viewport with the Select state. Clicking this button transfers the selected points/primitives into the Pattern field as a compacted range (e.g. <code>1-23 40 67-100</code>). This eliminates the need for typing the point or primitive numbers manually.<br />
'''Note:''' Point and primitive selections can be dumped directly into Group fields without use of the Group SOP. Do this by selecting the points or primitives in the Viewport with the Select state. Then the pop-up N menu beside the Group field of the SOP you want to cook should display the selection in the input SOP (e.g. "grid1's Primitive Selection"). Ranges are automatically compacted.<br />
|opFamily=SOP <br />
|parType=Pulse<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=5 <br />
|parItems= <br />
{{ParameterItem|itemLabel=""<br />
|itemName=rangestart<br />
|parName=range<br />
|itemSummary=<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=""<br />
|itemName=rangeend<br />
|parName=range<br />
|itemSummary=<br />
|opFamily=SOP<br />
}} <br />
<br />
|parLabel=Start / End <br />
|parName=range <br />
|parSummary=Activated when Operation is set to Group by Range. Select the start and end of the primitive/point number selection.<br />
|opFamily=SOP <br />
|parType=Int<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=6 <br />
|parItems= <br />
{{ParameterItem|itemLabel=""<br />
|itemName=select1<br />
|parName=select<br />
|itemSummary=<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=""<br />
|itemName=select2<br />
|parName=select<br />
|itemSummary=<br />
|opFamily=SOP<br />
}} <br />
<br />
|parLabel=Select _ of _ <br />
|parName=select <br />
|parSummary=Activated when Operation is set to Group by Range. Select every nth occurrence of every mth entity in the above Start/End range.<br />
<br />
'''For Example:''' entering 1 and 2 selects 1 out of every 2 entities.<br />
|opFamily=SOP <br />
|parType=Int<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=7 <br />
|parLabel=Filter Expression <br />
|parName=filter <br />
|parSummary=The Filter Expression provided is evaluated for every point/primitive. Wherever it is true, the entity is added. All the local variables of point and primitive are present, though only accessable when the right type of group is being created.<br />
|opFamily=SOP <br />
|parType=Int<br />
|parReadOnly= <br />
|parItems=}}<br />
<br />
{{Parameter|opType=group <br />
|parOrder=0 <br />
|parLabel=Use Bounds <br />
|parName=usebounds <br />
|parSummary=This option is used for selecting entities based on bounding volumes: Bounding Box, or Bounding Sphere. When Active, the selection options become active and can be used to select entities. The fields available are listed below. The bounding volume can be seen in the viewport as guide geometry.<br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=1 <br />
|parItems= <br />
{{ParameterItem|itemLabel=Bounding Box<br />
|itemName=usebbox<br />
|parName=boundtype<br />
|itemSummary=Entities contained within the box are selected.<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Bounding Sphere<br />
|itemName=usebsphere<br />
|parName=boundtype<br />
|itemSummary=Entities contained within the sphere are selected.<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Bounding Object (points only)<br />
|itemName=usebobject<br />
|parName=boundtype<br />
|itemSummary=Points contained within the Object are selected. Make sure the object consists of well formed polygons. If using an irregular mesh, convert to polygons with a Convert SOP, then use a Divide SOP to convex sides to 3.<br />
|opFamily=SOP<br />
}} <br />
<br />
|parLabel=Bounding Type <br />
|parName=boundtype <br />
|parSummary=Selects the type of bounding volume to use<br />
|opFamily=SOP <br />
|parType=Menu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=2 <br />
|parItems= <br />
{{ParameterItem|itemLabel=X<br />
|itemName=sizex<br />
|parName=size<br />
|itemSummary=<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Y<br />
|itemName=sizey<br />
|parName=size<br />
|itemSummary=<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Z<br />
|itemName=sizez<br />
|parName=size<br />
|itemSummary=<br />
|opFamily=SOP<br />
}} <br />
<br />
|parLabel=Size <br />
|parName=size <br />
|parSummary=Dimensions of either the Bounding Box or Bounding Sphere in X, Y and Z.<br />
|opFamily=SOP <br />
|parType=XYZ<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=3 <br />
|parItems= <br />
{{ParameterItem|itemLabel=X<br />
|itemName=tx<br />
|parName=t<br />
|itemSummary=<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Y<br />
|itemName=ty<br />
|parName=t<br />
|itemSummary=<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Z<br />
|itemName=tz<br />
|parName=t<br />
|itemSummary=<br />
|opFamily=SOP<br />
}} <br />
<br />
|parLabel=Center <br />
|parName=t <br />
|parSummary=The X, Y, and Z coordinates of the center of the bounding volume.<br />
|opFamily=SOP <br />
|parType=XYZ<br />
|parReadOnly=}}<br />
<br />
{{Parameter|opType=group <br />
|parOrder=0 <br />
|parLabel=Use Normal <br />
|parName=usenormal <br />
|parSummary=This option is used for selecting entities based on the angle of the entity normals. When the Active, the selection options become active and can be used to select entities. The fields available are listed below. <br />
<br />
The primary axis and the spread angle from the defined axis define a range of angles. If any entity normals lie within this range, then the associated entity is selected.<br />
<br />
'''For Example:''' if you want to select the polygons that are very steep in a polygon mountain terrain on the XZ axis. You would set the Direction to be 0, 1, 0 and the spread angle to around 75. This selects all the polygons with normals that lie flat to fairly sloped. You will have grouped all of the polygons that lie flat up to polys that are at a 75 angle from the axis. You are left with all of the polygons that are 76 or greater.<br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=1 <br />
|parItems= <br />
{{ParameterItem|itemLabel=X<br />
|itemName=dirx<br />
|parName=dir<br />
|itemSummary=<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Y<br />
|itemName=diry<br />
|parName=dir<br />
|itemSummary=<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Z<br />
|itemName=dirz<br />
|parName=dir<br />
|itemSummary=<br />
|opFamily=SOP<br />
}} <br />
<br />
|parLabel=Direction <br />
|parName=dir <br />
|parSummary= The default values of 0, 1, 0 create a normal vector straight up in Y, which is perpendicular to the XZ plane, which becomes the primary axis. The 1, 0, 0 points the normal in positive X, giving a normal axis perpendicular to the YZ. The plane may be positioned at an angle by using values typed in (1, 1, 0 gives a 45 angle plane) or interactively by using the direction vector jack. Values between 0 and 1 should be used.<br />
|opFamily=SOP <br />
|parType=XYZ<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=2 <br />
|parLabel=Spread Angle <br />
|parName=angle <br />
|parSummary=The value entered in this field generates an angle of deviation from the primary axis. This can be visualized as a cone where the radius of the base of the cone is defined by the Spread Angle and the axis of the cone is determined by the Direction axis. Viewing the primitive normals in the viewport, you can see that any primitives with normals that have an angle that lies in the range of angles defined by the cone will be selected and grouped.<br />
|opFamily=SOP <br />
|parType=Float<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=3 <br />
|parLabel=Backface from <br />
|parName=camera <br />
|parSummary=This menu allows you to select an object. Typically, a camera object would be chosen. The primitives which are backface when viewed from the object specified will be grouped or selected.<br />
|opFamily=SOP <br />
|parType=Object<br />
|parReadOnly= <br />
|parItems=}}<br />
<br />
{{Parameter|opType=group <br />
|parOrder=0 <br />
|parLabel=Use Edges <br />
|parName=useedges <br />
|parSummary=Allows you to group primitives by edges.<br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=1 <br />
|parLabel=Edge Angle <br />
|parName=doangle <br />
|parSummary=Enables the Edge Angle parameter.<br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=2 <br />
|parLabel=Edge Angle <br />
|parName=edgeangle <br />
|parSummary=Specifies an angle between edges in which to group. Works only for primitive groups.<br />
|opFamily=SOP <br />
|parType=Float<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=3 <br />
|parLabel=Edge Depth <br />
|parName=dodepth <br />
|parSummary=Enables the Edge Depth parameter. <br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=4 <br />
|parLabel=Edge Depth <br />
|parName=edgestep <br />
|parSummary=Enter the depth of the edge (only for point groups).<br />
|opFamily=SOP <br />
|parType=Int<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=5 <br />
|parLabel=Point Number <br />
|parName=point <br />
|parSummary=Enter the specific point numbers (only for point groups).<br />
|opFamily=SOP <br />
|parType=Int<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=6 <br />
|parLabel=Unshared Edges <br />
|parName=unshared <br />
|parSummary=When selecting points, this option selects the points of a ploygonal mesh which appear on the boundary (i.e. those which are not shared) for inclusion in the group, and orders them. In addition to polygonal meshes, this option also finds the boundaries of geo Hulls and open faces.<br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=7 <br />
|parLabel=Create Boundary Groups <br />
|parName=boundarygroups <br />
|parSummary=When selecting points with the Unshared Edges parameter, this option becomes available. Enabling it creates new groups of the form: <name>__< n> , (two underscores) where the < name> is the Group Name specified in the Create page. Numbers < n> begin at zero, and increment as more groups are created.<br />
<br />
These groups contain the points on each boundary of the surface. For example, if you have a grid with a hole in the middle of it, two new point groups are created - one containing the points for the outer boundary and one with the points from the hole. These new point groups are also ordered.<br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
<br />
|pageName=Create <br />
|opFamily=SOP <br />
|pageSummary= <br />
}} <br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opType=group <br />
|parOrder=0 <br />
|parItems= <br />
|parLabel=Group = <br />
|parName=grpequal <br />
|parSummary=Specify the group whose members you wish to edit. This can be one of the input groups or a new group created in this SOP specified in the Group Name parameter on the Group page. <br />
|opFamily=SOP <br />
|parType=StrMenu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=1 <br />
|parLabel=Not <br />
|parName=not1 <br />
|parSummary=When Off, include the members of the group specified in Group 1 parameter below. When On, include all members that are not part of the group specified in Group 1 parameter below. <br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=2 <br />
|parItems= <br />
|parLabel=Group 1 <br />
|parName=grp1 <br />
|parSummary=Select one of the input groups to start with, noting the setting of the Not (not1) parameter above. <br />
|opFamily=SOP <br />
|parType=StrMenu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=3 <br />
|parItems= <br />
{{ParameterItem|itemLabel=None <br />
|itemName=none <br />
|parName=op1 <br />
|itemSummary=No operation is performed between the groups. <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Union (Or) <br />
|itemName=or <br />
|parName=op1 <br />
|itemSummary=A OR B<br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Intersect (And) <br />
|itemName=and <br />
|parName=op1 <br />
|itemSummary=A AND B<br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Exclusive Or <br />
|itemName=xor <br />
|parName=op1 <br />
|itemSummary=!A OR !B<br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Subtraction <br />
|itemName=sub <br />
|parName=op1 <br />
|itemSummary=A minus B<br />
|opFamily=SOP <br />
}} <br />
<br />
|parLabel=Operation <br />
|parName=op1 <br />
|parSummary=Select the operation used to combine the group specified in Group 1 parameter with the group specified in Group 2 parameter. <br />
|opFamily=SOP <br />
|parType=Menu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=4 <br />
|parLabel=Not <br />
|parName=not2 <br />
|parSummary=When Off, include the members of the group specified in Group 2 parameter below. When On, include all members that are not part of the group specified in Group 2 parameter below. <br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=5 <br />
|parItems= <br />
|parLabel=Group 2 <br />
|parName=grp2 <br />
|parSummary=Select one of the input groups to combine with the group above, noting the setting of the Not (not2) parameter above. <br />
|opFamily=SOP <br />
|parType=StrMenu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=6 <br />
|parItems= <br />
{{ParameterItem|itemLabel=None <br />
|itemName=none <br />
|parName=op2 <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Union (Or) <br />
|itemName=or <br />
|parName=op2 <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Intersect (And) <br />
|itemName=and <br />
|parName=op2 <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Exclusive Or <br />
|itemName=xor <br />
|parName=op2 <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Subtraction <br />
|itemName=sub <br />
|parName=op2 <br />
|itemSummary= <br />
|opFamily=SOP <br />
}} <br />
<br />
|parLabel=Operation <br />
|parName=op2 <br />
|parSummary=Select the operation used to combine the group specified in Group 2 parameter with the group specified in Group 3 parameter. <br />
|opFamily=SOP <br />
|parType=Menu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=7 <br />
|parLabel=Not <br />
|parName=not3 <br />
|parSummary=When Off, include the members of the group specified in Group 3 parameter below. When On, include all members that are not part of the group specified in Group 3 parameter below. <br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=8 <br />
|parItems= <br />
|parLabel=Group 3 <br />
|parName=grp3 <br />
|parSummary=Select one of the input groups to combine with the group combination above, noting the setting of the Not (not3) parameter above. <br />
|opFamily=SOP <br />
|parType=StrMenu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=9 <br />
|parItems= <br />
{{ParameterItem|itemLabel=None <br />
|itemName=none <br />
|parName=op3 <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Union (Or) <br />
|itemName=or <br />
|parName=op3 <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Intersect (And) <br />
|itemName=and <br />
|parName=op3 <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Exclusive Or <br />
|itemName=xor <br />
|parName=op3 <br />
|itemSummary= <br />
|opFamily=SOP <br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Subtraction <br />
|itemName=sub <br />
|parName=op3 <br />
|itemSummary= <br />
|opFamily=SOP <br />
}} <br />
<br />
|parLabel=Operation <br />
|parName=op3 <br />
|parSummary=Select the operation used to combine the group specified in Group 3 parameter with the group specified in Group 4 parameter. <br />
|opFamily=SOP <br />
|parType=Menu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=10 <br />
|parLabel=Not <br />
|parName=not4 <br />
|parSummary=When Off, include the members of the group specified in Group 4 parameter below. When On, include all members that are not part of the group specified in Group 4 parameter below. <br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=11 <br />
|parItems= <br />
|parLabel=Group 4 <br />
|parName=grp4 <br />
|parSummary=Select one of the input groups to combine with the group combination above, noting the setting of the Not (not4) parameter above. <br />
|opFamily=SOP <br />
|parType=StrMenu<br />
|parReadOnly=}} <br />
<br />
|pageName=Combine <br />
|opFamily=SOP <br />
|pageSummary=This page of parameters lets you modify the The number of primitives or points in one of the input groups by combining groups through different operations. <br />
}} <br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opType=group <br />
|parOrder=0 <br />
|parItems= <br />
{{ParameterItem|itemLabel=Primitive to Point Group<br />
|itemName=toprim<br />
|parName=cnvtype<br />
|itemSummary=<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Point to Primitive Group<br />
|itemName=topoint<br />
|parName=cnvtype<br />
|itemSummary=<br />
|opFamily=SOP<br />
}} <br />
<br />
|parLabel=Convert Type <br />
|parName=cnvtype <br />
|parSummary=Converts a group from a point group to a primitive group, and vice versa.<br />
|opFamily=SOP <br />
|parType=Menu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=1 <br />
|parItems= <br />
|parLabel=Group <br />
|parName=convertg <br />
|parSummary=Name of the group to convert.<br />
|opFamily=SOP <br />
|parType=StrMenu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=2 <br />
|parLabel=Convert Name <br />
|parName=cnvtname <br />
|parSummary=New group name.<br />
|opFamily=SOP <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|opType=group <br />
|parOrder=3 <br />
|parLabel=Preserve Original <br />
|parName=preserve <br />
|parSummary=When checked, preserves original geometry.<br />
|opFamily=SOP <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
<br />
{{Parameter|opType=group <br />
|parOrder=0 <br />
|parItems= <br />
|parLabel=Group <br />
|parName=oldname <br />
|parSummary=Allows you to rename an existing group to something else.<br />
|opFamily=SOP <br />
|parType=StrMenu<br />
|parReadOnly=}} <br />
{{Parameter|opType=group <br />
|parOrder=1 <br />
|parLabel=New Name <br />
|parName=newname <br />
|parSummary=Allows you to rename an existing group to something else.<br />
|opFamily=SOP <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems=}} <br />
<br />
{{Parameter|opType=group <br />
|parOrder=0 <br />
|parItems= <br />
|parLabel=Group <br />
|parName=destroyname <br />
|parSummary=Allows you to delete an existing point or primitive group.<br />
|opFamily=SOP <br />
|parType=StrMenu<br />
|parReadOnly=}} <br />
<br />
|pageName=Edit <br />
|opFamily=SOP <br />
|pageSummary=This folder allows you to edit existing groups. <br />
}} <br />
{{InputsPage<br />
|opFamily=SOP<br />
|opInputs={{OPInput<br />
|opFamily=SOP<br />
|inputIndex=0<br />
|inputName=<br />
|inputSummary=<br />
}}<!---->{{OPInput<br />
|opFamily=SOP<br />
|inputIndex=1<br />
|inputName=<br />
|inputSummary=<br />
}}<br />
}}<br />
{{InfoCHOPChannels<br />
|opFamily=SOP<br />
|opLabel=Group<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{SOPNavBox <br />
|opFamily=SOP <br />
}} <br />
{{#invoke:Category <br />
|list|SOPs}}</div>Robhttps://docs.derivative.ca/index.php?title=Sequence_Class&diff=28156Sequence Class2023-01-19T17:13:51Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=Sequence|summary=An object describing a set of sequential parameter blocks. Accessed via the <code>sequence</code> member of [[Par Class|parameters]].<br />
<syntaxhighlight lang=python><br />
seq = op('/base1').par.iopshortcut1.sequence # get the sequence object<br />
print(len(seq)) # number of par blocks in the sequence<br />
print(seq[0]) # first par block in the sequence<br />
for parBlock in seq:<br />
print(parBlock) # print all par blocks<br />
<br />
seq.numBlocks += 1 # add a new block of parameters (same as pressing + in the UI)<br />
<br />
<br />
# A parameter block is a tuple of parameters that make up one block in a set of sequential parameters.<br />
</syntaxhighlight><br />
}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|empty=<br />
|items=<br />
{{ClassMember<br />
|class=Sequence<br />
|name=owner<br />
|type=OP<br />
|set=0<br />
|text=The OP to which this object belongs.}}<br />
{{ClassMember<br />
|class=Sequence<br />
|name=numBlocks<br />
|type=int<br />
|set=1<br />
|text=Get or set the total number of parameter blocks in this sequence.}}<br />
{{ClassMember<br />
|class=Sequence<br />
|name=maxBlocks<br />
|type=int<br />
|set=0<br />
|text=The maximum number of blocks allowed in the sequence, or None if limitless.}}<br />
{{ClassMember<br />
|class=Sequence<br />
|name=blocks<br />
|type=set<br />
|set=0<br />
|text=The set of all blocks in this sequence. A block is a set of parameters which can be repeated in an operator.}}<br />
}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|empty=True<br />
|items=<br />
}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=ListCOMP_Class&diff=28097ListCOMP Class2022-12-19T16:09:41Z<p>Rob: </p>
<hr />
<div>{{lowercase<br />
}}<br />
{{OPClassSummary<br />
|OPfamily=COMP<br />
|OPtype=list<br />
|OPlabel=List<br />
}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|set=0<br />
|text=The table [[ListAttribute Class|attributes]]. The members of these attributes can be directly written to / updated with new values. Any row/col or cell attributes defined will override these values. Define global per-table attributes here.<br />
<syntaxhighlight lang=python><br />
n.tableAttribs.fontFace = 'Verdana'<br />
n.tableAttribs.bgColor = (0,0.3,0,1) #dark green background<br />
</syntaxhighlight>|type=td.ListAttribute<br />
|class=listCOMP<br />
|name=attribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of row [[ListAttributes Class|attributes]]. Accessed by row index. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined a the table level.<br />
<syntaxhighlight lang=python><br />
n.colAttribs[4].colWidth = 100<br />
n.colAttribs[4].bgColor = (0,0.6,0,1) #highlight entire column in bright green<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=colAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of row [[ListAttributes Class|attributes]]. Accessed by row index. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined a the table level.<br />
<syntaxhighlight lang=python><br />
n.rowAttribs[3].rowHeight = 50<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=rowAttribs<br />
}}<br />
<br />
{{ClassMember<br />
|set=0<br />
|text=The set of cell [[ListAttributes Class|attributes]]. Accessed by row and column. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined at the row/col or table level.<br />
<syntaxhighlight lang=python><br />
n.cellAttribs[3,4].text = 'Fade'<br />
n.cellAttribs[3,4].bgColor = (0.5,0,0,1) #highlight this cell red<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=cellAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of attributes actually displayed in the cell. They are a combination of the cell/row/col/table attributes described above. Accessed by row and column. When combining attributes, cell attributes take priority over row and column attributes, which themselves take priority over table attributes.<br />
<syntaxhighlight lang=python>n.displayAttribs[3,4].bgColor #the resulting background color for this specific cell</syntaxhighlight><br />
|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=displayAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Last column with focus for editing.<br />
|type=int<br />
|class=listCOMP<br />
|name=focusCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Last row with focus for editing.<br />
|type=int<br />
|class=listCOMP<br />
|name=focusRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last selected column.<br />
|type=int<br />
|class=listCOMP<br />
|name=radioCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last selected row.<br />
|type=int<br />
|class=listCOMP<br />
|name=radioRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last column rolled over.<br />
|type=int<br />
|class=listCOMP<br />
|name=rolloverCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last row rolled over.<br />
|type=int<br />
|class=listCOMP<br />
|name=rolloverRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently selected column.<br />
|type=int<br />
|class=listCOMP<br />
|name=selectCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently selected row.<br />
|type=int<br />
|class=listCOMP<br />
|name=selectRow<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the border color for the separate selection, expressed as a 4-tuple, representing its red, green, blue and alpha value.<br />
|type=tuple(r, g, b, a)<br />
|class=listCOMP<br />
|name=selectionBorderColor<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the background color for the separate selection, expressed as a 4-tuple, representing its red, green, blue and alpha value.<br />
|type=tuple(r, g, b, a)<br />
|class=listCOMP<br />
|name=selectionColor<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the row and column coordinates for separate selection formatting, expressed as a list of 4-tuples, each representing startrow, startcol, endrow, endcol.<br />
|type=[(startrow, startcol, endrow, endcol), (startrow, startcol, endrow, endcol), ..]<br />
|class=listCOMP<br />
|name=selections<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently dragged row.<br />
|type=int<br />
|class=listCOMP<br />
|name=dragRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently dragged column.<br />
|type=int<br />
|class=listCOMP<br />
|name=dragCol<br />
}}<br />
|empty=<br />
}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|text=Scroll List component to the row and column specified.<br />
*row, col - The row and column to scroll to.<br />
|returns=None<br />
|name=scroll<br />
|call=scroll(row, col)<br />
|class=listCOMP<br />
}}<br />
{{ClassMethod<br />
|text=Selects and sets the keyboard focus in a cell of the table if the cell is a field.<br />
*row, col - The row and column of the cell to set the keyboard focus.<br />
*selectAll - (Keyword, Optional) If True, then all text will be selected.<br />
|returns=None<br />
|name=setKeyboardFocus<br />
|call=setKeyboardFocus(row, col, selectAll=False)<br />
|class=listCOMP<br />
}}<br />
<br />
|empty=<br />
}}<br />
{{CallbackSection<br />
|text=<br />
|file=ListCOMP_callbacks.py<br />
}}<br />
{{ClassInheritance<br />
|class=PanelCOMP<br />
}}<br />
{{ClassInheritance<br />
|class=COMP<br />
}}<br />
{{ClassInheritance<br />
|class=OP<br />
}}<br />
{{History<br />
}}<br />
{{#invoke:Category<br />
|list|COMP Classes|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=ListCOMP_Class&diff=28096ListCOMP Class2022-12-19T16:09:08Z<p>Rob: </p>
<hr />
<div>{{lowercase<br />
}}<br />
{{OPClassSummary<br />
|OPfamily=COMP<br />
|OPtype=list<br />
|OPlabel=List<br />
}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|set=0<br />
|text=The table [[ListAttribute Class|attributes]]. The members of these attributes can be directly written to / updated with new values. Any row/col or cell attributes defined will override these values. Define global per-table attributes here.<br />
<syntaxhighlight lang=python><br />
n.tableAttribs.fontFace = 'Verdana'<br />
n.tableAttribs.bgColor = (0,0.3,0,1) #dark green background<br />
</syntaxhighlight>|type=td.ListAttribute<br />
|class=listCOMP<br />
|name=attribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of row [[ListAttributes Class|attributes]]. Accessed by row index. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined a the table level.<br />
<syntaxhighlight lang=python><br />
n.colAttribs[4].colWidth = 100<br />
n.colAttribs[4].bgColor = (0,0.6,0,1) #highlight entire column in bright green<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=colAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of row [[ListAttributes Class|attributes]]. Accessed by row index. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined a the table level.<br />
<syntaxhighlight lang=python><br />
n.rowAttribs[3].rowHeight = 50<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=rowAttribs<br />
}}<br />
<br />
{{ClassMember<br />
|set=0<br />
|text=The set of cell [[ListAttributes Class|attributes]]. Accessed by row and column. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined at the row/col or table level.<br />
<syntaxhighlight lang=python><br />
n.cellAttribs[3,4].text = 'Fade'<br />
n.cellAttribs[3,4].bgColor = (0.5,0,0,1) #highlight this cell red<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=cellAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of attributes actually displayed in the cell. They are a combination of the cell/row/col/table attributes described above. Accessed by row and column. When combining attributes, cell attributes take priority over row and column attributes, which themselves take priority over table attributs.<br />
<syntaxhighlight lang=python>n.displayAttribs[3,4].bgColor #the resulting background color for this specific cell</syntaxhighlight><br />
|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=displayAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Last column with focus for editing.<br />
|type=int<br />
|class=listCOMP<br />
|name=focusCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Last row with focus for editing.<br />
|type=int<br />
|class=listCOMP<br />
|name=focusRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last selected column.<br />
|type=int<br />
|class=listCOMP<br />
|name=radioCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last selected row.<br />
|type=int<br />
|class=listCOMP<br />
|name=radioRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last column rolled over.<br />
|type=int<br />
|class=listCOMP<br />
|name=rolloverCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last row rolled over.<br />
|type=int<br />
|class=listCOMP<br />
|name=rolloverRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently selected column.<br />
|type=int<br />
|class=listCOMP<br />
|name=selectCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently selected row.<br />
|type=int<br />
|class=listCOMP<br />
|name=selectRow<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the border color for the separate selection, expressed as a 4-tuple, representing its red, green, blue and alpha value.<br />
|type=tuple(r, g, b, a)<br />
|class=listCOMP<br />
|name=selectionBorderColor<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the background color for the separate selection, expressed as a 4-tuple, representing its red, green, blue and alpha value.<br />
|type=tuple(r, g, b, a)<br />
|class=listCOMP<br />
|name=selectionColor<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the row and column coordinates for separate selection formatting, expressed as a list of 4-tuples, each representing startrow, startcol, endrow, endcol.<br />
|type=[(startrow, startcol, endrow, endcol), (startrow, startcol, endrow, endcol), ..]<br />
|class=listCOMP<br />
|name=selections<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently dragged row.<br />
|type=int<br />
|class=listCOMP<br />
|name=dragRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently dragged column.<br />
|type=int<br />
|class=listCOMP<br />
|name=dragCol<br />
}}<br />
|empty=<br />
}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|text=Scroll List component to the row and column specified.<br />
*row, col - The row and column to scroll to.<br />
|returns=None<br />
|name=scroll<br />
|call=scroll(row, col)<br />
|class=listCOMP<br />
}}<br />
{{ClassMethod<br />
|text=Selects and sets the keyboard focus in a cell of the table if the cell is a field.<br />
*row, col - The row and column of the cell to set the keyboard focus.<br />
*selectAll - (Keyword, Optional) If True, then all text will be selected.<br />
|returns=None<br />
|name=setKeyboardFocus<br />
|call=setKeyboardFocus(row, col, selectAll=False)<br />
|class=listCOMP<br />
}}<br />
<br />
|empty=<br />
}}<br />
{{CallbackSection<br />
|text=<br />
|file=ListCOMP_callbacks.py<br />
}}<br />
{{ClassInheritance<br />
|class=PanelCOMP<br />
}}<br />
{{ClassInheritance<br />
|class=COMP<br />
}}<br />
{{ClassInheritance<br />
|class=OP<br />
}}<br />
{{History<br />
}}<br />
{{#invoke:Category<br />
|list|COMP Classes|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=ListCOMP_Class&diff=28095ListCOMP Class2022-12-19T16:07:25Z<p>Rob: </p>
<hr />
<div>{{lowercase<br />
}}<br />
{{OPClassSummary<br />
|OPfamily=COMP<br />
|OPtype=list<br />
|OPlabel=List<br />
}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|set=0<br />
|text=The table [[ListAttribute Class|attributes]]. The members of these attributes can be directly written to / updated with new values. Any row/col or cell attributes defined will override these values. Define global per-table attributes here.<br />
<syntaxhighlight lang=python><br />
n.tableAttribs.fontFace = 'Verdana'<br />
n.tableAttribs.bgColor = (0,0.3,0,1) #dark green background<br />
</syntaxhighlight>|type=td.ListAttribute<br />
|class=listCOMP<br />
|name=attribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of row [[ListAttributes Class|attributes]]. Accessed by row index. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined a the table level.<br />
<syntaxhighlight lang=python><br />
n.colAttribs[4].colWidth = 100<br />
n.colAttribs[4].bgColor = (0,0.6,0,1) #highlight entire column in bright green<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=colAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of row [[ListAttributes Class|attributes]]. Accessed by row index. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined a the table level.<br />
<syntaxhighlight lang=python><br />
n.rowAttribs[3].rowHeight = 50<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=rowAttribs<br />
}}<br />
<br />
{{ClassMember<br />
|set=0<br />
|text=The set of cell [[ListAttributes Class|attributes]]. Accessed by row and column. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined at the row/col or table level.<br />
<syntaxhighlight lang=python><br />
n.cellAttribs[3,4].text = 'Fade'<br />
n.cellAttribs[3,4].bgColor = (0.5,0,0,1) #highlight this cell red<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=cellAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of attributes actually displayed in the cell. They are a combination of the cell/row/col/table attributes described above. Accessed by row and column. When combining attributes, cell attributes take priority over row and column attributes, which themselves take priority over table attributs.<br />
<syntaxhighlight lang=python>n.displayAttribs[3,4].bgColor</syntaxhighlight><br />
|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=displayAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Last column with focus for editing.<br />
|type=int<br />
|class=listCOMP<br />
|name=focusCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Last row with focus for editing.<br />
|type=int<br />
|class=listCOMP<br />
|name=focusRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last selected column.<br />
|type=int<br />
|class=listCOMP<br />
|name=radioCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last selected row.<br />
|type=int<br />
|class=listCOMP<br />
|name=radioRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last column rolled over.<br />
|type=int<br />
|class=listCOMP<br />
|name=rolloverCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last row rolled over.<br />
|type=int<br />
|class=listCOMP<br />
|name=rolloverRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently selected column.<br />
|type=int<br />
|class=listCOMP<br />
|name=selectCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently selected row.<br />
|type=int<br />
|class=listCOMP<br />
|name=selectRow<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the border color for the separate selection, expressed as a 4-tuple, representing its red, green, blue and alpha value.<br />
|type=tuple(r, g, b, a)<br />
|class=listCOMP<br />
|name=selectionBorderColor<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the background color for the separate selection, expressed as a 4-tuple, representing its red, green, blue and alpha value.<br />
|type=tuple(r, g, b, a)<br />
|class=listCOMP<br />
|name=selectionColor<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the row and column coordinates for separate selection formatting, expressed as a list of 4-tuples, each representing startrow, startcol, endrow, endcol.<br />
|type=[(startrow, startcol, endrow, endcol), (startrow, startcol, endrow, endcol), ..]<br />
|class=listCOMP<br />
|name=selections<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently dragged row.<br />
|type=int<br />
|class=listCOMP<br />
|name=dragRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently dragged column.<br />
|type=int<br />
|class=listCOMP<br />
|name=dragCol<br />
}}<br />
|empty=<br />
}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|text=Scroll List component to the row and column specified.<br />
*row, col - The row and column to scroll to.<br />
|returns=None<br />
|name=scroll<br />
|call=scroll(row, col)<br />
|class=listCOMP<br />
}}<br />
{{ClassMethod<br />
|text=Selects and sets the keyboard focus in a cell of the table if the cell is a field.<br />
*row, col - The row and column of the cell to set the keyboard focus.<br />
*selectAll - (Keyword, Optional) If True, then all text will be selected.<br />
|returns=None<br />
|name=setKeyboardFocus<br />
|call=setKeyboardFocus(row, col, selectAll=False)<br />
|class=listCOMP<br />
}}<br />
<br />
|empty=<br />
}}<br />
{{CallbackSection<br />
|text=<br />
|file=ListCOMP_callbacks.py<br />
}}<br />
{{ClassInheritance<br />
|class=PanelCOMP<br />
}}<br />
{{ClassInheritance<br />
|class=COMP<br />
}}<br />
{{ClassInheritance<br />
|class=OP<br />
}}<br />
{{History<br />
}}<br />
{{#invoke:Category<br />
|list|COMP Classes|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=ListCOMP_Class&diff=28094ListCOMP Class2022-12-19T15:52:25Z<p>Rob: </p>
<hr />
<div>{{lowercase<br />
}}<br />
{{OPClassSummary<br />
|OPfamily=COMP<br />
|OPtype=list<br />
|OPlabel=List<br />
}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|set=0<br />
|text=The table [[ListAttribute Class|attributes]]. The members of these attributes can be directly written to / updated with new values. And row/col or cell attributes defined will override these values. Define global per-table attributes here.<br />
<syntaxhighlight lang=python><br />
n.tableAttribs.text<br />
</syntaxhighlight>|type=td.ListAttribute<br />
|class=listCOMP<br />
|name=attribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of cell [[ListAttributes Class|attributes]]. Accessed by row and column. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined at the row/col or table level.<br />
<syntaxhighlight lang=python><br />
n.cellAttribs[3,4].text<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=cellAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of row [[ListAttributes Class|attributes]]. Accessed by row index. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined a the table level.<br />
<syntaxhighlight lang=python><br />
n.colAttribs[4].text<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=colAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of row [[ListAttributes Class|attributes]]. Accessed by row index. The members of these attributes can be directly written to / updated with new values and take priority over any attribute members defined a the table level.<br />
<syntaxhighlight lang=python><br />
n.rowAttribs[3].text<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=rowAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of attributes actually displayed in the cell. They are a combination of the cell/row/col/table attributes described above. Accessed by row and column.<br />
<syntaxhighlight lang=python>n.displayAttribs[3,4].text</syntaxhighlight><br />
|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=displayAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Last column with focus for editing.<br />
|type=int<br />
|class=listCOMP<br />
|name=focusCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Last row with focus for editing.<br />
|type=int<br />
|class=listCOMP<br />
|name=focusRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last selected column.<br />
|type=int<br />
|class=listCOMP<br />
|name=radioCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last selected row.<br />
|type=int<br />
|class=listCOMP<br />
|name=radioRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last column rolled over.<br />
|type=int<br />
|class=listCOMP<br />
|name=rolloverCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last row rolled over.<br />
|type=int<br />
|class=listCOMP<br />
|name=rolloverRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently selected column.<br />
|type=int<br />
|class=listCOMP<br />
|name=selectCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently selected row.<br />
|type=int<br />
|class=listCOMP<br />
|name=selectRow<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the border color for the separate selection, expressed as a 4-tuple, representing its red, green, blue and alpha value.<br />
|type=tuple(r, g, b, a)<br />
|class=listCOMP<br />
|name=selectionBorderColor<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the background color for the separate selection, expressed as a 4-tuple, representing its red, green, blue and alpha value.<br />
|type=tuple(r, g, b, a)<br />
|class=listCOMP<br />
|name=selectionColor<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the row and column coordinates for separate selection formatting, expressed as a list of 4-tuples, each representing startrow, startcol, endrow, endcol.<br />
|type=[(startrow, startcol, endrow, endcol), (startrow, startcol, endrow, endcol), ..]<br />
|class=listCOMP<br />
|name=selections<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently dragged row.<br />
|type=int<br />
|class=listCOMP<br />
|name=dragRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently dragged column.<br />
|type=int<br />
|class=listCOMP<br />
|name=dragCol<br />
}}<br />
|empty=<br />
}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|text=Scroll List component to the row and column specified.<br />
*row, col - The row and column to scroll to.<br />
|returns=None<br />
|name=scroll<br />
|call=scroll(row, col)<br />
|class=listCOMP<br />
}}<br />
{{ClassMethod<br />
|text=Selects and sets the keyboard focus in a cell of the table if the cell is a field.<br />
*row, col - The row and column of the cell to set the keyboard focus.<br />
*selectAll - (Keyword, Optional) If True, then all text will be selected.<br />
|returns=None<br />
|name=setKeyboardFocus<br />
|call=setKeyboardFocus(row, col, selectAll=False)<br />
|class=listCOMP<br />
}}<br />
<br />
|empty=<br />
}}<br />
{{CallbackSection<br />
|text=<br />
|file=ListCOMP_callbacks.py<br />
}}<br />
{{ClassInheritance<br />
|class=PanelCOMP<br />
}}<br />
{{ClassInheritance<br />
|class=COMP<br />
}}<br />
{{ClassInheritance<br />
|class=OP<br />
}}<br />
{{History<br />
}}<br />
{{#invoke:Category<br />
|list|COMP Classes|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=ListCOMP_Class&diff=28093ListCOMP Class2022-12-19T15:46:35Z<p>Rob: </p>
<hr />
<div>{{lowercase<br />
}}<br />
{{OPClassSummary<br />
|OPfamily=COMP<br />
|OPtype=list<br />
|OPlabel=List<br />
}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|set=0<br />
|text=The table [[ListAttribute Class|attributes]]. The members of these attributes can be directly written to / updated with new values.<br />
<syntaxhighlight lang=python><br />
n.tableAttribs.text<br />
</syntaxhighlight>|type=td.ListAttribute<br />
|class=listCOMP<br />
|name=attribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of cell [[ListAttributes Class|attributes]]. Accessed by row and column. The members of these attributes can be directly written to / updated with new values.<br />
<syntaxhighlight lang=python><br />
n.cellAttribs[3,4].text<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=cellAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of row [[ListAttributes Class|attributes]]. Accessed by row index. The members of these attributes can be directly written to / updated with new values.<br />
<syntaxhighlight lang=python><br />
n.colAttribs[4].text<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=colAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Last column with focus for editing.<br />
|type=int<br />
|class=listCOMP<br />
|name=focusCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Last row with focus for editing.<br />
|type=int<br />
|class=listCOMP<br />
|name=focusRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last selected column.<br />
|type=int<br />
|class=listCOMP<br />
|name=radioCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last selected row.<br />
|type=int<br />
|class=listCOMP<br />
|name=radioRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last column rolled over.<br />
|type=int<br />
|class=listCOMP<br />
|name=rolloverCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The last row rolled over.<br />
|type=int<br />
|class=listCOMP<br />
|name=rolloverRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of row [[ListAttributes Class|attributes]]. Accessed by row index. The members of these attributes can be directly written to / updated with new values.<br />
<syntaxhighlight lang=python><br />
n.rowAttribs[3].text<br />
</syntaxhighlight>|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=rowAttribs<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently selected column.<br />
|type=int<br />
|class=listCOMP<br />
|name=selectCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently selected row.<br />
|type=int<br />
|class=listCOMP<br />
|name=selectRow<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the border color for the separate selection, expressed as a 4-tuple, representing its red, green, blue and alpha value.<br />
|type=tuple(r, g, b, a)<br />
|class=listCOMP<br />
|name=selectionBorderColor<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the background color for the separate selection, expressed as a 4-tuple, representing its red, green, blue and alpha value.<br />
|type=tuple(r, g, b, a)<br />
|class=listCOMP<br />
|name=selectionColor<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the row and column coordinates for separate selection formatting, expressed as a list of 4-tuples, each representing startrow, startcol, endrow, endcol.<br />
|type=[(startrow, startcol, endrow, endcol), (startrow, startcol, endrow, endcol), ..]<br />
|class=listCOMP<br />
|name=selections<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently dragged row.<br />
|type=int<br />
|class=listCOMP<br />
|name=dragRow<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The currently dragged column.<br />
|type=int<br />
|class=listCOMP<br />
|name=dragCol<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=The set of attributes actually displayed in the cell. The combination of all relevant attributes contributing to the cell. Accessed by row and column.<br />
<syntaxhighlight lang=python>n.displayAttribs[3,4].text</syntaxhighlight><br />
|type=td.ListAttributes<br />
|class=listCOMP<br />
|name=displayAttribs<br />
}}<br />
|empty=<br />
}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|text=Scroll List component to the row and column specified.<br />
*row, col - The row and column to scroll to.<br />
|returns=None<br />
|name=scroll<br />
|call=scroll(row, col)<br />
|class=listCOMP<br />
}}<br />
{{ClassMethod<br />
|text=Selects and sets the keyboard focus in a cell of the table if the cell is a field.<br />
*row, col - The row and column of the cell to set the keyboard focus.<br />
*selectAll - (Keyword, Optional) If True, then all text will be selected.<br />
|returns=None<br />
|name=setKeyboardFocus<br />
|call=setKeyboardFocus(row, col, selectAll=False)<br />
|class=listCOMP<br />
}}<br />
<br />
|empty=<br />
}}<br />
{{CallbackSection<br />
|text=<br />
|file=ListCOMP_callbacks.py<br />
}}<br />
{{ClassInheritance<br />
|class=PanelCOMP<br />
}}<br />
{{ClassInheritance<br />
|class=COMP<br />
}}<br />
{{ClassInheritance<br />
|class=OP<br />
}}<br />
{{History<br />
}}<br />
{{#invoke:Category<br />
|list|COMP Classes|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=MIDI_Event_DAT&diff=28092MIDI Event DAT2022-12-16T21:46:55Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opFamily=DAT <br />
|opLicense=Non-Commercial <br />
|opLabel=MIDI Event <br />
|long=The MIDI Event DAT logs all [[MIDI]] messages coming into or out of TouchDesigner from all MIDI In/Out operators. Note: no messages will be logged if there are no active MIDI In or Out operators set to receive them. It outputs columns in a table format: message, type, channel, index, value. <br />
<br />
The table is FIFO "first-in first-out" and limited to parameter-set number of lines. An optional script may be run for each packet received. <br />
<br />
See also the [[MIDI In DAT]], [[MIDI In Map CHOP]], [[MIDI In CHOP]], [[MIDI Out CHOP]], Tscript <code>midi()</code> Command. <br />
|opType=midievent <br />
|opClass=midieventDAT_Class <br />
|opFilter=False <br />
|short=The MIDI Event DAT logs all MIDI messages coming into TouchDesigner from all MIDI devices. <br />
|opCategories= <br />
}} <br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opFamily=DAT <br />
|parName=active <br />
|parLabel=Active <br />
|parOrder=0 <br />
|opType=midievent <br />
|parSummary=Logs MIDI events when turned on. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
<br />
|opFamily=DAT <br />
|pageName=Connect <br />
|pageSummary= <br />
}} <br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opFamily=DAT <br />
|parName=skipsense <br />
|parLabel=Skip Sense <br />
|parOrder=0 <br />
|opType=midievent <br />
|parSummary=Does not log sense messages when this is turned on. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=skiptiming <br />
|parLabel=Skip Timing <br />
|parOrder=1 <br />
|opType=midievent <br />
|parSummary=Does not report timing messages when this is turned on. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=filter <br />
|parLabel=Filter Messages <br />
|parOrder=2 <br />
|opType=midievent <br />
|parSummary=Turning this on enables the message filtering parameters below. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=message <br />
|parLabel=Message <br />
|parOrder=3 <br />
|opType=midievent <br />
|parSummary=Filter by the MIDI message content. Example "Control Change" <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=channel <br />
|parLabel=Channel <br />
|parOrder=4 <br />
|opType=midievent <br />
|parSummary=Filter by the MIDI message channel. Channels range from 1 to 16.<br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=index <br />
|parLabel=Index <br />
|parOrder=5 <br />
|opType=midievent <br />
|parSummary=Filter by the MIDI message index. Indices range from 1 to 128.<br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=value <br />
|parLabel=Value <br />
|parOrder=6 <br />
|opType=midievent <br />
|parSummary=Filter by the MIDI message value. Values range from 0 to 127.<br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=dir <br />
|parLabel=Dir <br />
|parOrder=7 <br />
|opType=midievent <br />
|parSummary=Filter by the message direction, "input" or "output".<br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
<br />
|opFamily=DAT <br />
|pageName=Filter <br />
|pageSummary= <br />
}} <br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opFamily=DAT <br />
|parName=callbacks <br />
|parLabel=Callbacks DAT <br />
|parOrder=0 <br />
|opType=midievent <br />
|parSummary=Runs this script once for each row added to the table (ie. MIDI event recieved). See [[midieventDAT_Class]] for usage. <br />
|parType=DAT<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=executeloc <br />
|parOrder=1 <br />
|parLabel=Execute from <br />
|opType=midievent <br />
|parItems= <br />
{{ParameterItem|opFamily=DAT<br />
|parName=executeloc<br />
|itemLabel=Current Node<br />
|itemSummary=The script is executed from the current node location.<br />
|itemName=current<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=executeloc<br />
|itemLabel=Callbacks DAT<br />
|itemSummary=The script is executed from the location of the DAT specified in the <span class="tipTextDAT">Callbacks DAT</span> parameter.<br />
|itemName=callbacks<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=executeloc<br />
|itemLabel=Specified Operator<br />
|itemSummary=The script is executed from the operator specified in the <span class="tipTextDAT">From Operator</span> parameter below.<br />
|itemName=op<br />
}} <br />
<br />
|parSummary=Determines the location the script is run from. <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=fromop <br />
|parLabel=From Operator <br />
|parOrder=2 <br />
|opType=midievent <br />
|parSummary=The operator whose state change will trigger the DAT to execute its script when <span class="tipTextDAT">Execute</span> is set to <span class="tipTextDAT">Specified Operator</span>. This operator is also the path that the script will be executed from if the <span class="tipTextDAT">Execute From</span> parameter is set to <span class="tipTextDAT">Specified Operator</span>. <br />
|parType=OP<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=clamp <br />
|parLabel=Clamp Output <br />
|parOrder=3 <br />
|opType=midievent <br />
|parSummary=The DAT is limited to 100 messages by default but with Clamp Output, this can be set to anything including unlimited. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=maxlines <br />
|parLabel=Maximum Lines <br />
|parOrder=4 <br />
|opType=midievent <br />
|parSummary=Limits the number of messages, older messages are removed from the list first. <br />
|parType=Int<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=clear <br />
|parLabel=Clear Output <br />
|parOrder=5 <br />
|opType=midievent <br />
|parSummary=Deletes all lines except the heading. To clear with a python script <code>op(''"opname"'').par.clear.pulse()</code> <br />
|parType=Pulse<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=bytes <br />
|parLabel=Bytes Column <br />
|parOrder=6 <br />
|opType=midievent <br />
|parSummary=Outputs the raw bytes of the message in a separate column. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
<br />
|opFamily=DAT <br />
|pageName=Received Messages <br />
|pageSummary= <br />
}} <br />
{{:DAT Generator Common Page <br />
}} <br />
<br />
{{InfoCHOPChannels<br />
|opFamily=DAT<br />
|opLabel=MIDI Event<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{DATNavBox <br />
|opFamily=DAT <br />
}} <br />
{{#invoke:Category <br />
|list|DATs}}</div>Robhttps://docs.derivative.ca/index.php?title=TimerCHOP_Class&diff=28088TimerCHOP Class2022-12-16T15:51:16Z<p>Rob: </p>
<hr />
<div>{{lowercase<br />
}}<br />
{{OPClassSummary<br />
|OPfamily=CHOP<br />
|OPtype=timer<br />
|OPlabel=Timer<br />
}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|class=timerCHOP<br />
|items=<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in frames. 0-based.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginFrame<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in samples. 0-based.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginSample<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in seconds.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the cumulative time expressed in frames. See <code>.cumulativeSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=cumulativeFrames<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the cumulative time expressed in samples. See <code>.cumulativeSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=cumulativeSamples<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the cumulative time expressed in seconds. It counts from 0 when you Start. Unlike <code>.runningSeconds</code>, it is slowed/sped by the Speed parameter, and paused by the Play parameter. It continues to increase if there is any looping, jumping or scrubbing around.<br />
|type=float<br />
|class=timerCHOP<br />
|name=cumulativeSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the cumulative time as a timecode in the form 00:00:00.00. See <code>.cumulativeSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=cumulativeTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in frames. 0-based. See <code>.masterSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=masterFrames<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in frames. 0-based. See <code>.masterSeconds</code>.<br />
|type=int<br />
|deprecated=True<br />
|class=timerCHOP<br />
|name=masterFrame<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in samples. See <code>.masterSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=masterSamples<br />
}}<br />
ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in samples. See <code>.masterSeconds</code>.<br />
|type=int<br />
|deprecated=True<br />
|class=timerCHOP<br />
|name=masterSample<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in seconds. It counts from 0 when you Start, <code>.masterSeconds</code> is slowed/sped by the Speed parameter, and paused by the Play parameter. It jumps to the appropriate time when you scrub. This is the main clock in the Timer CHOP and can be set directly using python (<code>OP.masterSeconds = ''val''</code>), or use the <code>.goTo()</code> function which has more options. When multi-segments are specified to the Timer CHOP, it reflects the time as if you ran through the segments without interrupting it. If in any segment Cycle is on and Cycle Limit is off, it calculates as if the cycle runs only once.<br />
|type=float<br />
|class=timerCHOP<br />
|name=masterSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in fractional form. See <code>.masterSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=masterFraction<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed as a timecode in the form 00:00:00.00. See <code>.masterSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=masterTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the cycle index of the current segment.<br />
|type=float<br />
|class=timerCHOP<br />
|name=cycle<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the time index in fractional form, same as the <code>timer_fraction</code> channel. Used in the callbacks, it's more up-to-date to the current frame. (When using segments, it's the first segment).<br />
|type=float<br />
|class=timerCHOP<br />
|name=fraction<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time expressed in frames. 0-based. See <code>.playingSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=playingFrames<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time expressed in samples. See <code>.playingSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=playingSamples<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time expressed in seconds. It counts from 0 when you Start. it is unaffected by the Speed parameter, but unlike <code>.runningSeconds</code>, it is paused by the Play parameter. It continues to increase if there is any looping, jumping or scrubbing around.<br />
|type=float<br />
|class=timerCHOP<br />
|name=playingSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time as a timecode in the form 00:00:00.00. See <code>.playingSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=playingTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index expressed in fractional form. See <code>.runningSeconds</code>. This will be an estimate as the actual length is approximated on start.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningFraction<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time expressed in frames. 0-based. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningFrames<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time expressed in frames. 0-based. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|deprecated=True<br />
|name=runningFrame<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index expressed in samples. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningSamples<br />
}}<br />
<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index expressed in samples. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|deprecated=True<br />
|name=runningSample<br />
}}<br />
<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time expressed in seconds. It keeps counting up after Start and is not affected by changing the Speed or pausing Play or scrubbing. It is basically the "wall clock" after pressing Start. (You normally don't set the value, use <code>.masterSeconds</code>.) It doesn't reset to 0 until you Initialize or Start again.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index as a timecode in the form 00:00:00.00. See <code>.runningSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=runningTimecode<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in frames.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthFrames<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in samples.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthSamples<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in seconds.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthSeconds<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length as a timecode in the form 00:00:00.00.<br />
|type=str<br />
|class=timerCHOP<br />
|name=runningLengthTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the segment index.<br />
|type=float<br />
|class=timerCHOP<br />
|name=segment<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the list of segments.<br />
|type=list<br />
|class=timerCHOP<br />
|name=segments<br />
}}<br />
|empty=<br />
}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|text=Jump to the next segment. Equivalent to pulsing the Go to Next Segment parameter on the Segments Page.<br />
|returns=None<br />
|name=goToNextSegment<br />
|call=goToNextSegment()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Jump to the end of the current cycle. Equivalent to pulsing the Go to End of Cycle parameter on the Timer Page.<br />
|returns=None<br />
|name=goToCycleEnd<br />
|call=goToCycleEnd()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Allows the user to jump to a different time index based on the arguments passed in. Only one unit of time (seconds, frame, sample, fraction) can be specified when calling this method. For example, including both seconds and frame will yield an error. If there are multiple segments, and only a unit of time is specified, the method will jump to the corresponding running time index. If either a segment index or a cycle index or both are specified along with a unit of time, the method will jump to the corresponding local time index. There are fifteen different combinations of arguments that the user can pass in. An example of how this method can be called is: timerop.goTo(segment=1, cycle=2, seconds=5, endOfCycle=True).<br />
*segment - (Keyword, Optional) If specified, will jump to the indicated segment number (0 is first).<br />
*cycle - (Keyword, Optional) If specified, will jump to the indicated cycle number (0 is first).<br />
*endOfCycle - (Keyword, Optional) False by default. If specified as True, the goTo() function with the specified arguments will be called again at the end of the cycle, causing a jump only at that time to the specified location.<br />
*seconds - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify frame, sample, or fraction.<br />
*frame - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, sample, or fraction.<br />
*sample - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, frame, or fraction.<br />
*fraction - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, frame, or sample.<br />
|returns=None<br />
|name=goTo<br />
|call=goTo(segment=num, cycle=num, endOfCycle=True, seconds=num, frame=num, sample=num, fraction=num)<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Jump to the previous segment. Equivalent to pulsing the Go to Previous Segment parameter on the Segments Page.<br />
|returns=None<br />
|name=goToPrevSegment<br />
|call=goToPrevSegment()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Sets the current cycle to be the last cycle of the current segment. Equivalent to pulsing the Exit at End of Cycle parameter on the Timer Page.<br />
|returns=None<br />
|name=lastCycle<br />
|call=lastCycle()<br />
|class=timerCHOP<br />
}}<br />
<br />
|empty=<br />
}}<br />
{{CallbackSection<br />
|text=Note that <code>onTimerPulse()</code> is called when the timer starts counting up, and <code>onSegmentEnter()</code> is called when the segment starts, which is when the delay (if any) starts.<br />
<br />
Note that the <code>onInitialize()</code> return values let you initialize asyncrounously over several frames until you are ready to Start.<br />
|file=TimerCHOP_callbacks.py<br />
}}<br />
{{ClassInheritance<br />
|class=CHOP<br />
}}<br />
{{ClassInheritance<br />
|class=OP<br />
}}<br />
{{History<br />
}}<br />
{{#invoke:Category<br />
|list|CHOP Classes|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=TimerCHOP_Class&diff=28002TimerCHOP Class2022-12-07T18:23:57Z<p>Rob: </p>
<hr />
<div>{{lowercase<br />
}}<br />
{{OPClassSummary<br />
|OPfamily=CHOP<br />
|OPtype=timer<br />
|OPlabel=Timer<br />
}}<br />
{{ClassMemberSection<br />
|Sectionsummary=<br />
|class=timerCHOP<br />
|items=<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in frames.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginFrame<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in samples.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginSample<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get a list of begin values in seconds.<br />
|type=list<br />
|class=timerCHOP<br />
|name=beginSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the cumulative time expressed in frames. See <code>.cumulativeSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=cumulativeFrame<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the cumulative time expressed in samples. See <code>.cumulativeSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=cumulativeSample<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the cumulative time expressed in seconds. It counts from 0 when you Start. Unlike <code>.runningSeconds</code>, it is slowed/sped by the Speed parameter, and paused by the Play parameter. It continues to increase if there is any looping, jumping or scrubbing around.<br />
|type=float<br />
|class=timerCHOP<br />
|name=cumulativeSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the cumulative time as a timecode in the form 00:00:00.00. See <code>.cumulativeSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=cumulativeTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in frames. See <code>.masterSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=masterFrames<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in samples. See <code>.masterSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=masterSamples<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in seconds. It counts from 0 when you Start, <code>.masterSeconds</code> is slowed/sped by the Speed parameter, and paused by the Play parameter. It jumps to the appropriate time when you scrub. This is the main clock in the Timer CHOP and can be set directly using python (<code>OP.masterSeconds = ''val''</code>), or use the <code>.goTo()</code> function which has more options. When multi-segments are specified to the Timer CHOP, it reflects the time as if you ran through the segments without interrupting it. If in any segment Cycle is on and Cycle Limit is off, it calculates as if the cycle runs only once.<br />
|type=float<br />
|class=timerCHOP<br />
|name=masterSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed in fractional form. See <code>.masterSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=masterFraction<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the master time expressed as a timecode in the form 00:00:00.00. See <code>.masterSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=masterTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the cycle index of the current segment.<br />
|type=float<br />
|class=timerCHOP<br />
|name=cycle<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the time index in fractional form, same as the <code>timer_fraction</code> channel. Used in the callbacks, it's more up-to-date to the current frame. (When using segments, it's the first segment).<br />
|type=float<br />
|class=timerCHOP<br />
|name=fraction<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time expressed in frames. See <code>.playingSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=playingFrame<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time expressed in samples. See <code>.playingSeconds</code>.<br />
|type=int<br />
|class=timerCHOP<br />
|name=playingSample<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time expressed in seconds. It counts from 0 when you Start. it is unaffected by the Speed parameter, but unlike <code>.runningSeconds</code>, it is paused by the Play parameter. It continues to increase if there is any looping, jumping or scrubbing around.<br />
|type=float<br />
|class=timerCHOP<br />
|name=playingSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the playing time as a timecode in the form 00:00:00.00. See <code>.playingSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=playingTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index expressed in fractional form. See <code>.runningSeconds</code>. This will be an estimate as the actual length is approximated on start.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningFraction<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time expressed in frames. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningFrames<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in frames.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthFrames<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in samples.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthSamples<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length expressed in seconds.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningLengthSeconds<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the running length as a timecode in the form 00:00:00.00.<br />
|type=str<br />
|class=timerCHOP<br />
|name=runningLengthTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index expressed in samples. See <code>.runningSeconds</code>.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningSamples<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time expressed in seconds. It keeps counting up after Start and is not affected by changing the Speed or pausing Play or scrubbing. It is basically the "wall clock" after pressing Start. (You normally don't set the value, use <code>.masterSeconds</code>.) It doesn't reset to 0 until you Initialize or Start again.<br />
|type=float<br />
|class=timerCHOP<br />
|name=runningSeconds<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get the running time index as a timecode in the form 00:00:00.00. See <code>.runningSeconds</code>.<br />
|type=str<br />
|class=timerCHOP<br />
|name=runningTimecode<br />
}}<br />
{{ClassMember<br />
|set=1<br />
|text=Get or set the segment index.<br />
|type=float<br />
|class=timerCHOP<br />
|name=segment<br />
}}<br />
{{ClassMember<br />
|set=0<br />
|text=Get the list of segments.<br />
|type=list<br />
|class=timerCHOP<br />
|name=segments<br />
}}<br />
|empty=<br />
}}<br />
{{ClassMethodSection<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|text=Jump to the next segment. Equivalent to pulsing the Go to Next Segment parameter on the Segments Page.<br />
|returns=None<br />
|name=goToNextSegment<br />
|call=goToNextSegment()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Jump to the end of the current cycle. Equivalent to pulsing the Go to End of Cycle parameter on the Timer Page.<br />
|returns=None<br />
|name=goToCycleEnd<br />
|call=goToCycleEnd()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Allows the user to jump to a different time index based on the arguments passed in. Only one unit of time (seconds, frame, sample, fraction) can be specified when calling this method. For example, including both seconds and frame will yield an error. If there are multiple segments, and only a unit of time is specified, the method will jump to the corresponding running time index. If either a segment index or a cycle index or both are specified along with a unit of time, the method will jump to the corresponding local time index. There are fifteen different combinations of arguments that the user can pass in. An example of how this method can be called is: timerop.goTo(segment=1, cycle=2, seconds=5, endOfCycle=True).<br />
*segment - (Keyword, Optional) If specified, will jump to the indicated segment number (0 is first).<br />
*cycle - (Keyword, Optional) If specified, will jump to the indicated cycle number (0 is first).<br />
*endOfCycle - (Keyword, Optional) False by default. If specified as True, the goTo() function with the specified arguments will be called again at the end of the cycle, causing a jump only at that time to the specified location.<br />
*seconds - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify frame, sample, or fraction.<br />
*frame - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, sample, or fraction.<br />
*sample - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, frame, or fraction.<br />
*fraction - (Keyword, Optional) If specified, will jump to the indicated time index. Cannot also specify seconds, frame, or sample.<br />
|returns=None<br />
|name=goTo<br />
|call=goTo(segment=num, cycle=num, endOfCycle=True, seconds=num, frame=num, sample=num, fraction=num)<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Jump to the previous segment. Equivalent to pulsing the Go to Previous Segment parameter on the Segments Page.<br />
|returns=None<br />
|name=goToPrevSegment<br />
|call=goToPrevSegment()<br />
|class=timerCHOP<br />
}}<br />
{{ClassMethod<br />
|text=Sets the current cycle to be the last cycle of the current segment. Equivalent to pulsing the Exit at End of Cycle parameter on the Timer Page.<br />
|returns=None<br />
|name=lastCycle<br />
|call=lastCycle()<br />
|class=timerCHOP<br />
}}<br />
<br />
|empty=<br />
}}<br />
{{CallbackSection<br />
|text=Note that <code>onTimerPulse()</code> is called when the timer starts counting up, and <code>onSegmentEnter()</code> is called when the segment starts, which is when the delay (if any) starts.<br />
<br />
Note that the <code>onInitialize()</code> return values let you initialize asyncrounously over several frames until you are ready to Start.<br />
|file=TimerCHOP_callbacks.py<br />
}}<br />
{{ClassInheritance<br />
|class=CHOP<br />
}}<br />
{{ClassInheritance<br />
|class=OP<br />
}}<br />
{{History<br />
}}<br />
{{#invoke:Category<br />
|list|CHOP Classes|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=Boolean_SOP&diff=27994Boolean SOP2022-12-01T22:11:00Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opClass=booleanSOP_Class <br />
|opType=boolean <br />
|short=The Boolean SOP takes two closed polygonal sets, A and B. Set these Sources to the SOPs with the 3D shapes that you wish to operate on. <br />
|opFilter=True <br />
|opLabel=Boolean <br />
|long=The Boolean SOP takes two closed polygonal sets, A and B. Set these Sources to the SOPs with the 3D shapes that you wish to operate on. There are two important requirements for input geometry: <br />
<br />
* Shapes must be completely closed. A tube with open ends is not an acceptable input. You can close Tube ends with an end-cap. An extruded letter with no back polygons output is also unacceptable (even with backs output it can be unacceptable because of the second requirement). <br />
* All polygons must be convex and coplanar. In the case of the Extrude SOP, you must select Output Convex Faces for front and back faces. It will now be a usable input for Boolean. The Divide SOP also offers a convexing function for geometry not created with the Extrude SOP. <br />
<br />
Other caveats for Boolean are the following: <br />
<br />
* Point colors and texture UV coordinates are not interpolated correctly. <br />
* In some cases polygons can be reversed so that all normals point outwards. The polygon reversal should not usually present much of a problem (use a Primitive SOP &gt; Face/Hull page &gt; Vertex &gt; Reverse to reverse them if necessary). <br />
<br />
* A [[Facet SOP]] can be used to prepare inputs when the Boolean SOP complaints they are not closed. In that case, use both the Consolidate Points and Orient Polygons options.<br />
<br />
This SOP is quite visual and intuitive; you can experiment with the different combinations on screen to see the effects. <br />
<br />
'''Note:''' The Boolean SOP handles polygonal geometry types. For boolean-type operations with nurbs and Bezier surfaces - see [[Surfsect SOP]]. <br />
|opFamily=SOP <br />
|opLicense=Non-Commercial <br />
|opCategories= <br />
}}<br />
{{ParameterPage <br />
|pageName= <br />
|opFamily=SOP <br />
|pageSummary=<br />
|items= <br />
{{Parameter|parOrder=0 <br />
|parName=booleanop <br />
|parLabel=Operation <br />
|parSummary=Some of the operations below produce guide geometry to give you visual feedback on the results of the operation being performed. The appearance of the geometry is context sensitive - if you are performing an intersect operation, or either of the edge operations the guide will be both inputs; if you are doing A minus B then the guide will be B and if B minus A then the guide will be A. If you are doing union then there will be no guide geometry. <br />
<br />
If the guide geometry is too distracting, you can disable it by entering the Viewport options dialog and clicking on the Guide geometry button so that it no longer appears indented. This procedure is global and will disable the guide geometry of other SOPs as well.<br />
<br />
The Boolean SOP will automatically orient polygons so they face the same way. This may not be enough in some cases because Boolean results in some unshared edges where the intersection cut took place. If the shading is still not good enough, you are best to follow Boolean with a Facet SOP. In it, Consolidate Points, Orient Polygons and finally Cusp. <br />
<br />
If you have really strange shaped polygons, you can first triangulate one or both of the inputs with the Divide SOP. <br />
|parItems= <br />
{{ParameterItem|itemLabel=Union<br />
|itemName=union<br />
|itemSummary=Geometry from the two inputs is combined, and interior polygons are removed. The result is a closed shape. This can be very useful for joining pipes or other shapes that the camera will travel inside, or where the intersecting shapes must be transparent. Points at the intersection of the shapes are not consolidated.<br />
|parName=booleanop<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Intersect<br />
|itemName=intersect<br />
|itemSummary=The resulting geometry is a closed shape where the two input shapes overlap or intersect. Geometry outside the common area is discarded.<br />
|parName=booleanop<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=A minus B<br />
|itemName=aminusb<br />
|itemSummary=The result is a closed shape in which the geometry from B is cut away or subtracted from the geometry in A.<br />
|parName=booleanop<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=B minus A<br />
|itemName=bminusa<br />
|itemSummary=All operations same as previous three, but resulting shape is Part B with Part A cut away from it.<br />
|parName=booleanop<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=A Edge<br />
|itemName=aedge<br />
|itemSummary=Closed face(s) are produced, at the edges where the two parts meet. The face(s) can be twisted (not planar). The point order is unpredictable; append a Polygon SOP with the Order Points option enabled to sort them out if you want to make connections to the face.<br />
|parName=booleanop<br />
|opFamily=SOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=B Edge<br />
|itemName=bedge<br />
|itemSummary=Closed face(s) are produced, at the edges where the two parts meet. The face(s) can be twisted (not planar). The point order is unpredictable; append a Polygon SOP with the Order Points option enabled to sort them out if you want to make connections to the face.<br />
|parName=booleanop<br />
|opFamily=SOP<br />
}} <br />
<br />
|opFamily=SOP <br />
|opType=boolean <br />
|parType=Menu<br />
|parReadOnly=}} <br />
{{Parameter|parName=accattrib <br />
|parLabel=Accurate Attributes Interpolation <br />
|parSummary=If selected, all inputs are convexed to triangles, otherwise they are convexed to quadrilaterals. <br />
|parOrder=1 <br />
|opFamily=SOP <br />
|opType=boolean <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parName=creategroup <br />
|parLabel=Create Groups <br />
|parSummary=If selected, a group is created containing all faces pertaining to the first input, and a second group containing all faces of the second input. <br />
|parOrder=2 <br />
|opFamily=SOP <br />
|opType=boolean <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parName=groupa <br />
|parLabel=Group A <br />
|parSummary=When Create Groups = On, specify a name for Group A.<br />
|parOrder=3 <br />
|opFamily=SOP <br />
|opType=boolean <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|parName=groupb <br />
|parLabel=Group B <br />
|parSummary=When Create Groups = On, specify a name for Group B. <br />
|parOrder=4 <br />
|opFamily=SOP <br />
|opType=boolean <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems=}}<br />
}}<br />
{{OPSection<br />
|sectionName=Uses<br />
|sectionSummary=* Cutting a 3D shape from another 3D shape.<br />
* Joining a 3D shape to another 3D shape, removing interior polygons.<br />
* Creating a 3D shape where two 3D shapes intersect.<br />
* Creating holes or planes where 3D shapes intersect.<br />
* Animating any of the above effects.<br />
|opFamily=SOP}}<br />
{{InputsPage<br />
|opFamily=SOP<br />
|opInputs={{OPInput<br />
|opFamily=SOP<br />
|inputIndex=0<br />
|inputName=<br />
|inputSummary=<br />
}}<!---->{{OPInput<br />
|opFamily=SOP<br />
|inputIndex=1<br />
|inputName=<br />
|inputSummary=<br />
}}<br />
}}<br />
{{InfoCHOPChannels<br />
|opFamily=SOP<br />
|opLabel=Boolean<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{SOPNavBox <br />
|opFamily=SOP <br />
}} <br />
{{#invoke:Category <br />
|list|SOPs}}</div>Robhttps://docs.derivative.ca/index.php?title=Clock_CHOP&diff=27936Clock CHOP2022-11-07T18:45:57Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opFilter=False <br />
|long=The Clock CHOP generates channels that reflect the time of year, month, week, day, hour, minute, second and millisecond. It also has a moon cycle channel. It provides the date as separate channels and in different units. It presents the time in two ways: <br />
<br />
* It generates '''0-1 ramps''' that reflect the time of year, month, week, day, hour, minute, second and millisecond. <br />
* It generates '''integers that reflects the day-of month''' etc. In this form the year channel is 4 for 2004, etc. <br />
<br />
There are sunrise/sunset features, and you can override the day-of-year by inputting 1-6 channels into the CHOP. <br />
|opLabel=Clock <br />
|opClass=clockCHOP_Class <br />
|opType=clock <br />
|opLicense=Non-Commercial <br />
|opFamily=CHOP <br />
|short=The Clock CHOP generates channels that reflect the time of year, month, week, day, hour, minute, second and millisecond. <br />
|opCategories= <br />
}} <br />
{{ParameterPage <br />
|pageName=Clock <br />
|pageSummary= <br />
|opFamily=CHOP <br />
|items= <br />
{{Parameter|parOrder=0 <br />
|parSummary=Fractions or Units affects the channel data that is output from the Clock CHOP. Fraction gives convenient 0-1 ramps and Units give integers, like 0-23 for the hours of a day. For example, use Fractions and the day, hour and minute channels to drive a wall clock. <br />
|opType=clock <br />
|parName=output <br />
|opFamily=CHOP <br />
|parLabel=Output <br />
|parItems= <br />
{{ParameterItem|itemLabel=Units<br />
|itemName=units<br />
|parName=output<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Fractions<br />
|itemName=fractions<br />
|parName=output<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=1 <br />
|parSummary=12 hour or 24 hour - Causes the hour channel to cycle through 12 or 24 hours. Also affects the AM/PM channel. <br />
|opType=clock <br />
|parName=hourformat <br />
|opFamily=CHOP <br />
|parLabel=Hour Format <br />
|parItems= <br />
{{ParameterItem|itemLabel=12 hour<br />
|itemName=12<br />
|parName=hourformat<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=24 hour<br />
|itemName=24<br />
|parName=hourformat<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=2 <br />
|parSummary=After the Clock CHOP reads the current time, it adds Hour Adjust to pretend the current time is different than the actual current time. <br />
|opType=clock <br />
|parName=houradjust <br />
|opFamily=CHOP <br />
|parLabel=Hour Adjust <br />
|parType=Float<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=3 <br />
|parSummary=The date/time that corresponds to year 0, day 1, hour 0, minute 0. It can be relative to Jan 1, 2000 or to the time that the TouchDesigner process started. <br />
|opType=clock <br />
|parName=startref <br />
|opFamily=CHOP <br />
|parLabel=Start Reference <br />
|parItems= <br />
{{ParameterItem|itemLabel=Since Jan 1 2000<br />
|itemName=jan1<br />
|parName=startref<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Since Program Start<br />
|itemName=program<br />
|parName=startref<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=4 <br />
|parSummary=If Output is Units, it is the current millisecond, starting at 0 at the start of a second, going up to 999 at the end of a second. If Output is Fraction, it is the current fraction of a millisecond. <br />
|opType=clock <br />
|parName=msec <br />
|opFamily=CHOP <br />
|parLabel=Millisecond <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=5 <br />
|parSummary=If Output is Units, it is the current second, starting at 0 for on-the-hour, going up to 59. If Output is Fraction, it is the current fraction of a second (45 seconds past the minute gives .75). <br />
|opType=clock <br />
|parName=sec <br />
|opFamily=CHOP <br />
|parLabel=Second <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=6 <br />
|parSummary=If Output is Units, it is the current minute, starting at 0 for on-the-hour, going up to 59. If Output is Fraction, it is the current fraction of a minute (45 seconds past the minute gives .75). <br />
|opType=clock <br />
|parName=min <br />
|opFamily=CHOP <br />
|parLabel=Minute <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=7 <br />
|parSummary=If Output is Units, it is the current hour, starting at 0 for midnight and affected by AM/PM. If Output is Fraction, it is the current fraction of an hour (15 minutes past the hour gives .25), taking into account the current minute and second. <br />
|opType=clock <br />
|parName=hour <br />
|opFamily=CHOP <br />
|parLabel=Hour <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=8 <br />
|parSummary=0 if before noon, 1 if after noon. <br />
|opType=clock <br />
|parName=ampm <br />
|opFamily=CHOP <br />
|parLabel=AM/PM <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=9 <br />
|parSummary=If Output is Units, it is the actual day of the week, starting with 0 for Monday and 6 for Sunday. <br />
|opType=clock <br />
|parName=wday <br />
|opFamily=CHOP <br />
|parLabel=Day of Week <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=10 <br />
|parSummary=If Output is Units, it is the actual day of the month, so on March 20, it is 20. If Output is Fraction, it is fraction of a day of the current moment, so at 6:30 PM, it is .77, taking into account the hour, minute and second. <br />
|opType=clock <br />
|parName=day <br />
|opFamily=CHOP <br />
|parLabel=Day of Month <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=11 <br />
|parSummary=If Output is Units, it is the Day of year, starting with 0 for January 1. If it is Fraction, it is the same as Day of Month. <br />
|opType=clock <br />
|parName=yday <br />
|opFamily=CHOP <br />
|parLabel=Day of Year <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=12 <br />
|parSummary=Week of the year, starting with 0 for the first week and 51 for the last week of the year. <br />
|opType=clock <br />
|parName=week <br />
|opFamily=CHOP <br />
|parLabel=Week <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=13 <br />
|parSummary=Month of the year, starting with 1 for January and 12 for December. <br />
|opType=clock <br />
|parName=month <br />
|opFamily=CHOP <br />
|parLabel=Month <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=14 <br />
|parSummary=If Output is Units, it is the integer year number relative to the Start Reference, starting at 0, so year 2009 is 9 by default. If Output is Fraction, it is the current fraction of a year, taking into account today's month, day, hour, minute and second. <br />
|opType=clock <br />
|parName=year <br />
|opFamily=CHOP <br />
|parLabel=Year <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
<br />
}} <br />
{{ParameterPage <br />
|pageName=Solar <br />
|pageSummary= <br />
|opFamily=CHOP <br />
|items= <br />
{{Parameter|parOrder=0 <br />
|parSummary=Enter a latitude (hours/min north/south) of your location. (defaults to Toronto, Canada). Fractional hours are permitted. For example: 43.6532 hours and 0 minutes, is identical to 43 hours and 39 minutes. The parameter latitude1 is hours, latitude2 is minutes. <br />
|opType=clock <br />
|parName=latitude <br />
|opFamily=CHOP <br />
|parLabel=Latitude <br />
|parItems= <br />
{{ParameterItem|itemLabel=""<br />
|itemName=latitude1<br />
|parName=latitude<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=""<br />
|itemName=latitude2<br />
|parName=latitude<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Float<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=1 <br />
|parSummary=Set if the Latitude value above is in the north or south hemisphere. <br />
|opType=clock <br />
|parName=northsouth <br />
|opFamily=CHOP <br />
|parLabel=NS <br />
|parItems= <br />
{{ParameterItem|itemLabel=North<br />
|itemName=north<br />
|parName=northsouth<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=South<br />
|itemName=south<br />
|parName=northsouth<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=2 <br />
|parSummary=Enter a longitude (hours/min east/west) of your location. Fractional hours are permitted. The parameter longitude1 is hours, longitude2 is minutes. <br />
|opType=clock <br />
|parName=longitude <br />
|opFamily=CHOP <br />
|parLabel=Longitude <br />
|parItems= <br />
{{ParameterItem|itemLabel=""<br />
|itemName=longitude1<br />
|parName=longitude<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=""<br />
|itemName=longitude2<br />
|parName=longitude<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Float<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=3 <br />
|parSummary=Set if the Longitude value above is in the east or west hemisphere. <br />
|opType=clock <br />
|parName=eastwest <br />
|opFamily=CHOP <br />
|parLabel=EW <br />
|parItems= <br />
{{ParameterItem|itemLabel=East<br />
|itemName=east<br />
|parName=eastwest<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=West<br />
|itemName=west<br />
|parName=eastwest<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=4 <br />
|parSummary=Outputs the moon phase (0 to 1. .5 is a full moon, 0 and 1 are at the time of the new moon). <br />
|opType=clock <br />
|parName=moonphase <br />
|opFamily=CHOP <br />
|parLabel=Moon Phase <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=5 <br />
|parSummary=(0 to 1, where sunrise=0, sunset = 1, and it reverses down to 0 in time for the sunrise. <br />
|opType=clock <br />
|parName=sunphase <br />
|opFamily=CHOP <br />
|parLabel=Sun Phase <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=6 <br />
|parSummary=Outputs the sunrise time (0 to 1, midnight=0, twenty-four hours later = 1). <br />
|opType=clock <br />
|parName=sunrise <br />
|opFamily=CHOP <br />
|parLabel=Sunrise <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=7 <br />
|parSummary=Outputs the sunset time (0 to 1, midnight=0, twent.y-four hours later = 1). <br />
|opType=clock <br />
|parName=sunset <br />
|opFamily=CHOP <br />
|parLabel=Sunset <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parOrder=8 <br />
|parSummary=(-180 to 180, degrees north/south that the sun is off the equator). <br />
|opType=clock <br />
|parName=declination <br />
|opFamily=CHOP <br />
|parLabel=Declination <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
<br />
}} <br />
{{:CHOP Generator Common Page <br />
}} <br />
{{InputsPage<br />
|opFamily=CHOP<br />
|opInputs={{OPInput<br />
|opFamily=CHOP<br />
|inputIndex=0<br />
|inputName=<br />
|inputSummary=<br />
}}<br />
}}<br />
{{InfoCHOPChannels<br />
|opFamily=CHOP<br />
|opLabel=Clock<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{CHOPNavBox <br />
|opFamily=CHOP <br />
}} <br />
{{#invoke:Category <br />
|list|CHOPs}}</div>Robhttps://docs.derivative.ca/index.php?title=OP_Find_DAT&diff=27897OP Find DAT2022-10-19T14:31:52Z<p>Rob: </p>
<hr />
<div>{{Summary<br />
|opFamily=DAT<br />
|opLicense=Non-Commercial<br />
|opLabel=OP Find<br />
|long=The OP Find DAT traverses the component hierarchy starting at one component and looking at all nodes within that component, and outputs a table with one row per node that matches criteria the user chooses. For example, the criteria could be all Ramp TOPs, or all nodes whose name starts with “<code>wave</code>”, or all nodes with the Clone parameter set to “<code>master1</code>”, or all Geometry components with a tag called “<code>emitter</code>”. <br />
<br />
The criteria can limited to include only nodes of certain families, or certain operator types. It can filter on matching its path, certain parameters containing certain values (both constant and expressions), comments, tags, or the content of a DAT containing certain strings. <br />
<br />
You can also cause the DAT to only look to some depth of the hierarchy from the specified component, such as 2 levels down, or limitless. <br />
<br />
Criteria can be case-sensitive or not, but case-sensitive On or Off applies to all criteria in the OP Find DAT. <br />
<br />
Furthermore you can exclude some nodes using more specialized criteria by returning a True of False in a callback contained in the attached callback DAT. <br />
<br />
With the Combine Filters Menu (Any or All, Default is All), you can do an "or" or "and" on the pattern matching criterea. <br />
<br />
It also takes an optional DAT containing a list of operators (eg, another OP Find DAT) which can be used to chain filters. <br />
<br />
=== Output Columns === <br />
There is a variety of columns that you can select from including <code>name</code>, <code>id</code>, <code>paths</code>, <code>type</code> and <code>tags</code>. (<code>id</code> is a member of the operator, which is an integer unique to the node, and doesn't change during the running of the TouchDesigner process.) <br />
<br />
You can also output custom columns by defining the column names in the callback DAT, and filling in the column cells via another function in the callback DAT. For example, you can output a custom column which is the <code>tx</code> parameter value of the node. <br />
<br />
You can control when the OP Find DAT cooks. Normally it cooks whenever any of the nodes in the specified hierarchy changes. Using the Active Cook menu parameter, you can also force-cook it every frame, or turn off cooking entirely. You can also click the Pulse parameter on Active Cook in order to force-cook it once, or do the equivalent using the node.cookpulse.pulse() python call. <br />
<br />
Instead of being give the path to a component to start at, the OP Find DAT can take an input DAT containing a pre-generated list of paths to nodes to start from, and merge the results of each input line together in the output. To use this, the input DAT should contain the node “id” as the first column, which can be generated with another OP Find DAT with the Column called “ID” turned on. <br />
<br />
For example, say you first list all components that are panels, then you separate into groups based on type or Clone parameter. The first OP Find DAT pre-filters a huge hierarchy to a small fraction of the nodes, the subsequent OP Find DATs are operating on simpler sets to eliminate a lot of checking and cooking. <br />
<br />
Refer to Help -> [[OP Snippets|Operator Snippets]]. <br />
<br />
See also: [[Script DAT]]<br />
|opType=opfind<br />
|opClass=opfindDAT_Class<br />
|opFilter=False<br />
|short=The OP Find DAT traverses the component hierarchy starting at one component and looking at all nodes within that component, and outputs a table with one row per node that matches criteria the user chooses.<br />
}}<br />
{{ParameterPage<br />
|items={{Parameter<br />
|opFamily=DAT<br />
|parName=activecook<br />
|parOrder=0<br />
|parLabel=Active Cook<br />
|opType=opfind<br />
|parItems={{ParameterItem<br />
|opFamily=DAT<br />
|parName=activecook<br />
|itemLabel=Off<br />
|itemName=off<br />
|itemSummary=This stops the operator from cooking altogether.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=DAT<br />
|parName=activecook<br />
|itemLabel=Automatic<br />
|itemName=auto<br />
|itemSummary=Only cook / update the contents when the results would change.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=DAT<br />
|parName=activecook<br />
|itemLabel=Always<br />
|itemName=always<br />
|itemSummary=Continually cook this operator repeatedly for update cases that might be missed.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=DAT<br />
|parName=activecook<br />
|itemLabel=Incremental<br />
|itemName=incremental<br />
|itemSummary=This will cook each frame, but only add one result per cook, until all results are added. At that point cooking stops.<br />
}}<br />
|parSummary=Determines when to cook the DAT.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=cookpulse<br />
|parLabel=Cook Pulse<br />
|parOrder=1<br />
|opType=opfind<br />
|parSummary=Manually force the OP Find DAT to update.<br />
|parType=Pulse<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=component<br />
|parLabel=Component<br />
|parOrder=2<br />
|opType=opfind<br />
|parSummary=The path to the component where the search starts from.<br />
|parType=COMP<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=Include Component<br />
|parName=includecomponent<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=3<br />
|parSummary=Include the component the search starts from in the search itself.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=Include Wire Hierarchy<br />
|parName=includewired<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=4<br />
|parSummary=Any components wired to the starting component are included in the search.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=mindepth<br />
|parLabel=Minimum Depth<br />
|parOrder=5<br />
|opType=opfind<br />
|parSummary=Set a minmum depth for the sub-components the OP Find DAT should recursively search through.<br />
|parType=Int<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=limitmaxdepth<br />
|parLabel=Limit Max Depth<br />
|parOrder=6<br />
|opType=opfind<br />
|parSummary=Turns on the Maximum Depth parameter to limit searching through sub-components. Turning this toggle off will search through all sub-networks.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=maxdepth<br />
|parLabel=Maximum Depth<br />
|parOrder=7<br />
|opType=opfind<br />
|parSummary=Set the maximum depth for the sub-components the OP Find DAT should recursively search through.<br />
|parType=Int<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=Limit Max Operators<br />
|parName=limitmaxops<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=8<br />
|parSummary=Limit the total number of operators iterated in the search.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=Maximum Operators<br />
|parName=maxops<br />
|parType=Int<br />
|parReadOnly=<br />
|parOrder=9<br />
|parSummary=Number of operators the search is limited to.<br />
|parItems=<br />
}}<br />
|opFamily=DAT<br />
|pageName=Component<br />
|pageSummary=<br />
}}<br />
{{ParameterPage<br />
|items={{Parameter<br />
|opFamily=DAT<br />
|parName=objects<br />
|parLabel=Object COMPs<br />
|parOrder=0<br />
|opType=opfind<br />
|parSummary=Include Object COMPs, like Geo COMP, in the search.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=panels<br />
|parLabel=Panel COMPs<br />
|parOrder=1<br />
|opType=opfind<br />
|parSummary=Include Panel COMPs, like Container COMP, in the search.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=other<br />
|parLabel=Other COMPs<br />
|parOrder=2<br />
|opType=opfind<br />
|parSummary=Include other type COMPs, like Base COMP, in the search.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=tops<br />
|parLabel=TOPs<br />
|parOrder=3<br />
|opType=opfind<br />
|parSummary=Include DAT family operators in the search.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=chops<br />
|parLabel=CHOPs<br />
|parOrder=4<br />
|opType=opfind<br />
|parSummary=Include CHOP family operators in the search.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=sops<br />
|parLabel=SOPs<br />
|parOrder=5<br />
|opType=opfind<br />
|parSummary=Include SOP family operators in the search.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=mats<br />
|parLabel=MATs<br />
|parOrder=7<br />
|opType=opfind<br />
|parSummary=Include MAT family operators in the search.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=dats<br />
|parLabel=DATs<br />
|parOrder=8<br />
|opType=opfind<br />
|parSummary=Include DAT family operators in the search.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|opFamily=DAT<br />
|pageName=Families<br />
|pageSummary=The page of parameters determines which operator families are included in the search.<br />
}}<br />
{{ParameterPage<br />
|items={{Parameter<br />
|opFamily=DAT<br />
|parName=casesensitive<br />
|parLabel=Case Sensitive<br />
|parOrder=0<br />
|opType=opfind<br />
|parSummary=Use case sensitivity in all pattern matching below.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=combinefilters<br />
|parOrder=1<br />
|parLabel=Combine Filters<br />
|opType=opfind<br />
|parItems={{ParameterItem<br />
|opFamily=DAT<br />
|parName=combinefilters<br />
|itemLabel=All<br />
|itemSummary=All filters must match for an operator to be included in the search result. (AND)<br />
|itemName=all<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=DAT<br />
|parName=combinefilters<br />
|itemLabel=Any<br />
|itemSummary=Any of the filter conditions must be met for an operator to be included in the search result. (OR)<br />
|itemName=any<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=DAT<br />
|parName=combinefilters<br />
|itemLabel=Custom<br />
|itemName=custom<br />
|itemSummary=<br />
}}<br />
|parSummary=Combine 'All', 'Any' or 'Custom' of the filters below to get a match. 'Custom' allows for specifying a subselection of filters with 'or' and 'and' keywords.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=Custom Combine<br />
|parName=customcombine<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=2<br />
|parSummary=Specify which filters to combine in the search.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=namefilter<br />
|parLabel=Name<br />
|parOrder=3<br />
|opType=opfind<br />
|parSummary=Use the operator's names like 'wave1', 'wave2', etc.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=typefilter<br />
|parLabel=Type<br />
|parOrder=4<br />
|opType=opfind<br />
|parSummary=Use names like <code>waveCHOP</code> and <code>panelexecuteDAT</code>. Look at the column Type to see the syntax.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=Parent Shortcut<br />
|parName=parentshortcutfilter<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=5<br />
|parSummary=Only match operators that include the here specified Parent Shortcut.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=OP Shortcut<br />
|parName=opshortcutfilter<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=6<br />
|parSummary=Only match operators that include the here specified OP Shortcut.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=pathfilter<br />
|parLabel=Path<br />
|parOrder=7<br />
|opType=opfind<br />
|parSummary=Specify a path that the operator should be located in.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=parentfilter<br />
|parLabel=Parent Path (relative)<br />
|parOrder=8<br />
|opType=opfind<br />
|parSummary=Specify a relative parent path that operators should be located in. This is a filter option on the <code>parentPath</code> column of this DAT that can be enabled by toggling the <code>Parent Path</code> parameter on this DAT's <code>Columns</code> page.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=excludefilter<br />
|parLabel=Exclude Path (relative)<br />
|parOrder=9<br />
|opType=opfind<br />
|parSummary=Specify a relative path that should be excluded from the search.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=Wire Path<br />
|parName=wirepathfilter<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=10<br />
|parSummary=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=commentfilter<br />
|parLabel=Comment<br />
|parOrder=11<br />
|opType=opfind<br />
|parSummary=Only match operators that include the here specified comment string.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=tagsfilter<br />
|parLabel=Tags<br />
|parOrder=12<br />
|opType=opfind<br />
|parSummary=Only match operators that match the here specified tags. Multiple tags can be searched for as a space seperated list.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=textfilter<br />
|parLabel=DAT Text<br />
|parOrder=13<br />
|opType=opfind<br />
|parSummary=Only include operators that - in the case of being from the DAT family - match specified string in their content.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=parnamefilter<br />
|parLabel=Par Name<br />
|parOrder=14<br />
|opType=opfind<br />
|parSummary=Only match operators with specified parameter name. Parameters must match ALL of name, value and expression to be included.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=parvaluefilter<br />
|parLabel=Par Value<br />
|parOrder=15<br />
|opType=opfind<br />
|parSummary=Only include operators that match specified parameter value. Parameters must match ALL of name, value and expression to be included.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=parexpressionfilter<br />
|parLabel=Par Expression<br />
|parOrder=16<br />
|opType=opfind<br />
|parSummary=Only include operators that match specified parameter expression string. Parameters must match ALL of name, value and expression to be included.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=parnondefaultonly<br />
|parLabel=Par Non-Default Only<br />
|parOrder=17<br />
|opType=opfind<br />
|parSummary=Only match with parameters that are non-default values.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|opFamily=DAT<br />
|pageName=Filters<br />
|pageSummary=<br />
}}<br />
{{ParameterPage<br />
|items={{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=Use Legacy Columns<br />
|parName=legacycols<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=0<br />
|parSummary=Use only when expecting column headers to be named with legacy titles.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=idcol<br />
|parLabel=ID<br />
|parOrder=1<br />
|opType=opfind<br />
|parSummary=An integer that uniquely defines the node in this process. It's the same number for the duration of the process, but may be different when you run the process again.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=namecol<br />
|parLabel=Name<br />
|parOrder=2<br />
|opType=opfind<br />
|parSummary=Inlcude the name of the operator in the result table.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=typecol<br />
|parLabel=Type<br />
|parOrder=3<br />
|opType=opfind<br />
|parSummary=Include the operator type in the result table. For example <code>rampTOP</code>.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=Parent Shortcut<br />
|parName=parentshortcutcol<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=4<br />
|parSummary=Include the operator's Parent Shortcut in the result table. <br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=OP Shortcut<br />
|parName=opshortcutcol<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=5<br />
|parSummary=Include the operator's OP Shortcut in the result table.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=pathcol<br />
|parLabel=Path<br />
|parOrder=6<br />
|opType=opfind<br />
|parSummary=Include the operator's path in the result table.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=relpathcol<br />
|parLabel=Relative Path<br />
|parOrder=7<br />
|opType=opfind<br />
|parSummary=Include the operator's, relative to the search root, path in the result table.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=parentpath<br />
|parLabel=Parent Path<br />
|parOrder=8<br />
|opType=opfind<br />
|parSummary=Include the parent path.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=Wire Path<br />
|parName=wirepathcol<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=9<br />
|parSummary=Include the operator's wire path in the result table.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=depthcol<br />
|parLabel=Depth<br />
|parOrder=10<br />
|opType=opfind<br />
|parSummary=Include a column showing the relative depth to the root path of the found operator.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=cooktimescol<br />
|parLabel=Cook Times<br />
|parOrder=11<br />
|opType=opfind<br />
|parSummary=Include cook-time of found operators.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=tagscol<br />
|parLabel=Tags<br />
|parOrder=12<br />
|opType=opfind<br />
|parSummary=Include the operator's tags.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=General Properties<br />
|parName=genprop<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=13<br />
|parSummary=Include the operator's name, id, isCOMP, node position, node size and dock id in the result table.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=CPU Time<br />
|parName=cputime<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=14<br />
|parSummary=Include the operator's CPU cooktime in the result table.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=GPU Time<br />
|parName=gputime<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=15<br />
|parSummary=Include the operator's GPU cooktime in the result table.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=CPU Memory<br />
|parName=cpumem<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=16<br />
|parSummary=Include the operator's CPU memory in the result table.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=GPU Memory<br />
|parName=gpumem<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=17<br />
|parSummary=Include the operator's GPU memory in the result table.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|opType=opfindDAT<br />
|parLabel=Children<br />
|parName=children<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=18<br />
|parSummary=Include the children of the operator in the result table.<br />
|parItems=<br />
}}<br />
|opFamily=DAT<br />
|pageName=Columns<br />
|pageSummary=<br />
}}<br />
{{ParameterPage<br />
|items={{Parameter<br />
|opFamily=DAT<br />
|parName=callbacks<br />
|parLabel=Callbacks DAT<br />
|parOrder=0<br />
|opType=opfind<br />
|parSummary=Path to a DAT containing callbacks for each event received. See [[opfindDAT_Class]] for usage.<br />
|parType=DAT<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=convertbool<br />
|parLabel=Convert Bool to Int<br />
|parOrder=1<br />
|opType=opfind<br />
|parSummary=For boolean logic values, the value will be '1' or '0'. When this parameter is Off, they will be 'True" or 'False'.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=DAT<br />
|parName=convertnone<br />
|parLabel=Convert None to Empty<br />
|parOrder=2<br />
|opType=opfind<br />
|parSummary=For 'None' values, the value will be converted to Empty.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|opFamily=DAT<br />
|pageName=Callbacks<br />
|pageSummary=<br />
}}<br />
{{:DAT Generator Common Page}}<br />
{{InputsPage<br />
|opFamily=DAT<br />
|opInputs={{OPInput<br />
|opFamily=DAT<br />
|inputIndex=0<br />
|inputName=<br />
|inputSummary=<br />
}}<br />
}}<br />
{{History<br />
}}<br />
{{DATNavBox<br />
|opFamily=DAT<br />
}}<br />
{{#invoke:Category|list|DATs}}</div>Robhttps://docs.derivative.ca/index.php?title=COMP_Panel_Page&diff=27750COMP Panel Page2022-09-27T15:12:11Z<p>Rob: </p>
<hr />
<div>{{ParameterPage<br />
|pageName=Panel<br />
|pageSummary=The Panel parameter page controls panel attributes such as display on/off, enable on/off, panel help, and interactions with the cursor.<br />
|opFamily=COMP<br />
|items={{Parameter<br />
|parName=display<br />
|parLabel=Display<br />
|opFamily=COMP<br />
|parSummary=Specifies if the panel is displayed or hidden. Changing this parameter may incur some layout processing costs. For simple cases, such as overlays it is more performant to adjust the opacity parameter instead.<br />
|parOrder=0<br />
|opType=panel<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=enable<br />
|parLabel=Enable<br />
|opFamily=COMP<br />
|parSummary=Allows you to prevent all interaction with this panel.<br />
|parOrder=1<br />
|opType=panel<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=helpdat<br />
|parLabel=Help DAT<br />
|opFamily=COMP<br />
|parSummary=Lets you specify the path to a [[Text DAT]] whose content will be displayed as a rollover pop-up help for the control panel.<br />
|parOrder=2<br />
|opType=panel<br />
|parType=DAT<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=vieweraspect<br />
|parLabel=Floating Viewer Aspect<br />
|opFamily=COMP<br />
|parSummary=Controls whether the aspect ratio is proportional or unconstrained when resizing a floating viewer ie. dragging the edges of the viewer to resize it.<br />
|parItems={{ParameterItem<br />
|itemLabel=Proportional<br />
|itemSummary=<br />
|itemName=proportional<br />
|opFamily=COMP<br />
|parName=vieweraspect<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Unconstrained<br />
|itemSummary=<br />
|itemName=unconstrained<br />
|opFamily=COMP<br />
|parName=vieweraspect<br />
}}<br />
|parOrder=3<br />
|opType=panel<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=cursor<br />
|parLabel=Cursor<br />
|opFamily=COMP<br />
|parSummary=Changes the cursor displayed when cursor is over the panel.<br />
|parItems={{ParameterItem<br />
|itemLabel=Normal Select<br />
|itemSummary=<br />
|itemName=pointer<br />
|opFamily=COMP<br />
|parName=cursor<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Link Select<br />
|itemSummary=<br />
|itemName=linkselect<br />
|opFamily=COMP<br />
|parName=cursor<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Text Select<br />
|itemSummary=<br />
|itemName=ibeam<br />
|opFamily=COMP<br />
|parName=cursor<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Precision Select<br />
|itemSummary=<br />
|itemName=cross<br />
|opFamily=COMP<br />
|parName=cursor<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Busy<br />
|itemSummary=<br />
|itemName=busy<br />
|opFamily=COMP<br />
|parName=cursor<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Activate<br />
|itemSummary=<br />
|itemName=activate<br />
|opFamily=COMP<br />
|parName=cursor<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Invisible<br />
|itemSummary=<br />
|itemName=invisible<br />
|opFamily=COMP<br />
|parName=cursor<br />
}}<br />
|parOrder=4<br />
|opType=panel<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=multitouch<br />
|parLabel=Multi-Touch<br />
|opFamily=COMP<br />
|parSummary=When enabled, this panel will process the first touch it gets in a similar manner to how it processes a mouse click, with updates to u, v, state etc. The touch event must be initiated from the panel. Subsequent touches are ignored. If this panel handles multi-touch events via the [[Multi Touch In DAT]], you may want to disable Built-in Multi-Touch so it won't interfere with script processing.<br />
|parItems={{ParameterItem<br />
|itemLabel=Use Parent's Multi-Touch Settings<br />
|itemSummary=Use the parent's Multi-Touch setting. This defaults to enabled in the root component.<br />
|itemName=mtouchparent<br />
|opFamily=COMP<br />
|parName=multitouch<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Use Built-in Multi-Touch<br />
|itemSummary=Enable use of first touch as mouse.<br />
|itemName=mtouchyes<br />
|opFamily=COMP<br />
|parName=multitouch<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Do Not Use Built-in Multi-Touch<br />
|itemSummary=Disable use of first touch as mouse.<br />
|itemName=mtouchno<br />
|opFamily=COMP<br />
|parName=multitouch<br />
}}<br />
|parOrder=5<br />
|opType=panel<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|opFamily=COMP<br />
|opType=panel<br />
|parLabel=Constrain Cursor<br />
|parName=constraincursor<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parOrder=6<br />
|parSummary=Constrains the cursor to this panel, keeping it inside once it enters.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=clickthrough<br />
|parLabel=Click Through<br />
|opFamily=COMP<br />
|parSummary=When enabled all mouse clicks are ignored by this [[Panel Component]].<br />
|parOrder=7<br />
|opType=panel<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=mousewheel<br />
|parLabel=Use Mouse Wheel<br />
|opFamily=COMP<br />
|parSummary=Turn on to capture events when the mouse wheel is used over the panel.<br />
|parOrder=8<br />
|opType=panel<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=uvbuttons<br />
|parLabel=Mouse UV Buttons<br />
|opFamily=COMP<br />
|parSummary=Allows you to specify which mouse buttons update the uv [[Panel Value]]s.<br />
|parItems={{ParameterItem<br />
|itemLabel=Left<br />
|itemSummary=<br />
|itemName=uvbuttonsleft<br />
|opFamily=COMP<br />
|parName=uvbuttons<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Middle<br />
|itemSummary=<br />
|itemName=uvbuttonsmiddle<br />
|opFamily=COMP<br />
|parName=uvbuttons<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Right<br />
|itemSummary=<br />
|itemName=uvbuttonsright<br />
|opFamily=COMP<br />
|parName=uvbuttons<br />
}}<br />
|parOrder=9<br />
|opType=panel<br />
|parType=Toggle<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=mouserel<br />
|parLabel=Relative UV<br />
|opFamily=COMP<br />
|parSummary=When enabled the uv [[Panel Value]]s will reflect relative mouse movement.<br />
|parOrder=10<br />
|opType=panel<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=resize<br />
|parLabel=Drag Edges to Resize<br />
|opFamily=COMP<br />
|parSummary=Four checkboxes allow you to enable resizing a panel by grabbing the corresponding edge or corner: Resize Left, Right, Bottom, Top.<br />
|parItems={{ParameterItem<br />
|itemLabel=L<br />
|itemSummary=<br />
|itemName=resizel<br />
|opFamily=COMP<br />
|parName=resize<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=R<br />
|itemSummary=<br />
|itemName=resizer<br />
|opFamily=COMP<br />
|parName=resize<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=B<br />
|itemSummary=<br />
|itemName=resizeb<br />
|opFamily=COMP<br />
|parName=resize<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=T<br />
|itemSummary=<br />
|itemName=resizet<br />
|opFamily=COMP<br />
|parName=resize<br />
}}<br />
|parOrder=11<br />
|opType=panel<br />
|parType=Toggle<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=resizew<br />
|parLabel=W Range<br />
|opFamily=COMP<br />
|parSummary=Limits the left-right (width) resizing range.<br />
|parItems={{ParameterItem<br />
|itemLabel=""<br />
|itemSummary=<br />
|itemName=resizewmin<br />
|opFamily=COMP<br />
|parName=resizew<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=""<br />
|itemSummary=<br />
|itemName=resizewmax<br />
|opFamily=COMP<br />
|parName=resizew<br />
}}<br />
|parOrder=12<br />
|opType=panel<br />
|parType=Float<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=resizeh<br />
|parLabel=H Range<br />
|opFamily=COMP<br />
|parSummary=Limits the bottom-top (height) resizing range.<br />
|parItems={{ParameterItem<br />
|itemLabel=""<br />
|itemSummary=<br />
|itemName=resizehmin<br />
|opFamily=COMP<br />
|parName=resizeh<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=""<br />
|itemSummary=<br />
|itemName=resizehmax<br />
|opFamily=COMP<br />
|parName=resizeh<br />
}}<br />
|parOrder=13<br />
|opType=panel<br />
|parType=Float<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=reposition<br />
|parLabel=Drag to Reposition<br />
|opFamily=COMP<br />
|parSummary=Enables repositioning of the panel or window by dragging with the mouse.<br />
|parItems={{ParameterItem<br />
|itemLabel=Off<br />
|itemSummary=<br />
|itemName=off<br />
|opFamily=COMP<br />
|parName=reposition<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Window<br />
|itemSummary=<br />
|itemName=window<br />
|opFamily=COMP<br />
|parName=reposition<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=Component<br />
|itemSummary=<br />
|itemName=component<br />
|opFamily=COMP<br />
|parName=reposition<br />
}}<br />
|parOrder=14<br />
|opType=panel<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=repocomp<br />
|parLabel=Component<br />
|opFamily=COMP<br />
|parSummary=Enabled by choosing the '''Component''' option from the Reposition parameter. Specify the path to the panel component you would like to reposition by mouse.<br />
|parOrder=15<br />
|opType=panel<br />
|parType=PanelCOMP<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=repositionx<br />
|parLabel=X Range<br />
|opFamily=COMP<br />
|parSummary=Enabled by choosing the '''Component''' option from the Reposition parameter. Sets the maximum range for repositioning the panel component horizontally.<br />
|parItems={{ParameterItem<br />
|itemLabel=""<br />
|itemSummary=<br />
|itemName=repositionxmin<br />
|opFamily=COMP<br />
|parName=repositionx<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=""<br />
|itemSummary=<br />
|itemName=repositionxmax<br />
|opFamily=COMP<br />
|parName=repositionx<br />
}}<br />
|parOrder=16<br />
|opType=panel<br />
|parType=Float<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=repositiony<br />
|parLabel=Y Range<br />
|opFamily=COMP<br />
|parSummary=Enabled by choosing the '''Component''' option from the Reposition parameter. Sets the maximum range for repositioning the panel component vertically.<br />
|parItems={{ParameterItem<br />
|itemLabel=""<br />
|itemSummary=<br />
|itemName=repositionymin<br />
|opFamily=COMP<br />
|parName=repositiony<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemLabel=""<br />
|itemSummary=<br />
|itemName=repositionymax<br />
|opFamily=COMP<br />
|parName=repositiony<br />
}}<br />
|parOrder=17<br />
|opType=panel<br />
|parType=Float<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|opFamily=COMP<br />
|opType=panel<br />
|parLabel=Anchor Drag<br />
|parName=anchordrag<br />
|parType=Menu<br />
|parReadOnly=<br />
|parOrder=18<br />
|parSummary=When Drag To Reposition parameter is set to Component, and the panel's Horizontal Mode and/or Vertical Mode is set to Anchors, this menu determines whether drag-to-reposition actions change Anchor values or Offset values.<br />
|parItems={{ParameterItem<br />
|opFamily=COMP<br />
|parName=anchordrag<br />
|itemLabel=Anchors<br />
|itemName=anchors<br />
|itemSummary=Drag-to-reposition actions change Anchor parameter values<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=COMP<br />
|parName=anchordrag<br />
|itemLabel=Offsets<br />
|itemName=offsets<br />
|itemSummary=Drag-to-reposition actions change Offset parameter values<br />
}}<br />
}}<br />
{{Parameter<br />
|opFamily=COMP<br />
|opType=panel<br />
|parLabel=Scroll Overlay<br />
|parName=scrolloverlay<br />
|parType=Menu<br />
|parReadOnly=<br />
|parOrder=19<br />
|parSummary=Controls whether the panel is affected by scrollbar position. This allows the creation of panel overlays that aren't affected by the panel's scrollbars.<br />
|parItems={{ParameterItem<br />
|opFamily=COMP<br />
|parName=scrolloverlay<br />
|itemLabel=Off<br />
|itemName=off<br />
|itemSummary=Scrollbar affects panel normally.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=COMP<br />
|parName=scrolloverlay<br />
|itemLabel=Ignore<br />
|itemName=ignore<br />
|itemSummary=Panel will not move when scrollbar is moved. Panel depth is determined by Depth Layer parameter normally.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=COMP<br />
|parName=scrolloverlay<br />
|itemLabel=Ignore and Draw Over<br />
|itemName=ignoreover<br />
|itemSummary=Panel will not move when scrollbar is moved. Panel is drawn over scrollbars and sibling panels.<br />
}}<br />
}}<br />
}}<br />
<noinclude>[[Category:OP Help Common Pages]]</noinclude></div>Robhttps://docs.derivative.ca/index.php?title=ParGroup&diff=27608ParGroup2022-09-09T18:14:52Z<p>Rob: </p>
<hr />
<div><noinclude>{{#index:Lock}}{{Glossary<br />
|Title=ParGroup, Parameter Group<br />
|Short=A ParGroup is a group of related parameters that you can set and get as a whole instead of its individual parameters.<br />
|Long=<br />
}}</noinclude><!--<br />
-->A ParGroup or Parameter Group is a group of related parameters that you can set and get as a whole instead of its individual parameters.<br />
<br />
== ParGroup ==<br />
<br />
A [[ParGroup Class|ParGroup]] is a group of related parameters.<br />
It is often more natural to work with the [[ParGroup Class|ParGroup]] as a whole instead of its individual [[Par Class|parameters]].<br />
<br />
Often all parameters sharing the same line on a [[Parameter_Dialog|parameter dialog]] belong to the same [[ParGroup Class|ParGroup]].<br />
For example, in the [[Transform TOP]], ''Translate'' is a type of [[ParGroup Class|ParGroup]], with two primary [[Par Class|Par]] objects: ''tx'', ''ty'' and a unit [[Par Class|Par]].<br />
<br />
ParGroups with only single elements are also possible.<br />
For example, the ''Uniform Scale'' parameter of the [[Geometry COMP| Geometry Object]] belongs to a [[ParGroup Class|ParGroup]] with only one parameter.<br />
Note that ParGroups with multiple elements only contain numeric elements.<br />
Strings only exist in ParGroups of size 1.<br />
<br />
See also [[ParGroup Execute DAT]]<br />
<br />
=== Basic Usage ===<br />
<br />
The following example assumes ''n'' is a [[Transform TOP]] with its translate set to ''1, 2''<br />
Like ''n.par'', ''n.parGroup'' can be used to access individual [[ParGroup Class|ParGroup]] objects:<br />
<br />
<syntaxhighlight lang=python><br />
t = n.parGroup.t # set t to the Translate ParGroup<br />
t = n.parGroup["t"] # for convenience, name mapping access also works. Exact names only, no wildcards.<br />
</syntaxhighlight><br />
<br />
From here, most of the members and methods available to [[Par Class|Par]] objects are also available to [[ParGroup Class|ParGroup]] objects. Instead of returning one value however, they return a tuple of values where applicable.<br />
<br />
<syntaxhighlight lang=python>t.expr # returns (None, None) if the translate parameter has no expressions set </syntaxhighlight><br />
<br />
=== Evaluation ===<br />
<br />
<syntaxhighlight lang=python>t.eval() # returns (1, 2)</syntaxhighlight><br />
<br />
Note that if the [[ParGroup Class|ParGroup]] contains only a single element, such as the ''Uniform Scale'' parameters, its ''eval()'' method still returns a tuple and not a single value:<br />
<br />
<syntaxhighlight lang=python>n.parGroup.scale.eval() # returns (1.0,)</syntaxhighlight><br />
<br />
=== Size, Mapping and Iteration ===<br />
<br />
<syntaxhighlight lang=python>len(t) # returns 2, as this ParGroup contains 2 primary parameters. The unit parameter is ''not'' included here.<br />
<br />
t[1].name # returns 'ty', since t[1] return Par object ty.<br />
<br />
[i.name for i in t] # returns [‘tx’, ‘ty’] #primary parameters only<br />
<br />
[i.name for i in t.pars()] # returns [‘tx’, ‘ty’, 'unit'] #all parameters</syntaxhighlight><br />
<br />
The pars method is identical to OP.pars, and returns '''all''' parameters in this ParGroup, primary or otherwise.<br />
<br />
=== Assignment ===<br />
<br />
ParGroups can be assigned a single value (a scalar) or a tuple of the same size.<br />
Note in the following examples, both tuples () and lists [] are interchangeable.<br />
In some cases though, using list syntax is less ambiguous: ''[3] vs (3,),'' since ''(3)'' is not a tuple.<br />
<br />
<syntaxhighlight lang=python>n.parGroup.t = (4, 5) #assign tx=4, ty=5<br />
n.parGroup.t = [4,5] # any iterable object of size 2 will do<br />
<br />
n.parGroup.t = 5 #assign 5 to tx, ty<br />
n.parGroup.t = n.parGroup.p #assign pivot values to translate parameter.<br />
<br />
n.parGroup.t = (1,2,3) # error, cannot assign 3 elements to 2.</syntaxhighlight><br />
<br />
Note that the above also works when assigning directly to the Parameter val members:<br />
<br />
<syntaxhighlight lang=python>n.parGroup.t.val = (1,2) </syntaxhighlight><br />
<br />
=== Arithmetic ===<br />
<br />
ParGroups can be used in some arithmetic expressions directly, as operations are applied pairwise:<br />
<br />
<syntaxhighlight lang=python>n.parGroup.t + 1 # returns (2.0, 3.0)<br />
n.parGroup.t + (1,2) #returns (2.0, 4.0)</syntaxhighlight><br />
<br />
To ensure forward compatibility though, it is best to create [[Vector Class|ParGroup]] objects where applicable:<br />
<br />
<syntaxhighlight lang=python>tdu.Vector(n.parGroup.t) + (1,2) #returns a Vector with values 2.0 4.0 </syntaxhighlight><br />
<br />
=== Unit and Pulse Parameters ===<br />
<br />
Sometimes a [[ParGroup Class|ParGroup]] will end with a parameter of a different type on the same line, such as a unit menu or a pulse button.<br />
<br />
In this case, the [[ParGroup Class|ParGroup]] is actually a subclass, such as ''ParGroupUnit'' or ''ParGroupPulse''.<br />
These subclasses contain members to access these extra parameters:<br />
<br />
<syntaxhighlight lang=python><br />
m = op(‘timer1’)<br />
m.parGroup.length.unit.val = ‘seconds’ # set the unit parameter<br />
m.parGroup.cue.pulse() # pulse the applicable parameter<br />
</syntaxhighlight> <br />
<br />
=== Casting ===<br />
<br />
Casting a [[ParGroup Class|ParGroup]] to a bool will always raise an exception, as the [[ParGroup Class|ParGroup]] will always be a non-empty tuple, thus normally returning ''True''. This could lead to confusion where bool(n.parGroup.button) always returns ''True'', leading one to assume the button value itself is true.<br />
<br />
Casting a [[ParGroup Class|ParGroup]] to a float or int however, will only succeed if that [[ParGroup Class|ParGroup]] contains exactly 1 element, as in the case of a ''Uniform Scale'' for example:<br />
<br />
<syntaxhighlight lang=python>5 + float(n.parGroup.scale)</syntaxhighlight><br />
This also means ''op('geo1').parGroup.scale'' for example, can be used in a single parameter expression expecting a numeric avlue.<br />
<br />
Furthermore, the global functions ''any()'' and ''all()'' work as expected, given that ParGroups behave like tuples:<br />
<br />
<syntaxhighlight lang=python> any(n.parTuple.t) # true if any of tx,ty,tz non-zero<br />
all(n.parTuple.t) # true if all of tx,ty,tz non-zero<br />
</syntaxhighlight></div>Robhttps://docs.derivative.ca/index.php?title=MIDI_In_CHOP&diff=27319MIDI In CHOP2022-07-22T16:45:44Z<p>Rob: </p>
<hr />
<div>{{Summary<br />
|opFilter=False<br />
|long=The MIDI In CHOP reads Note events, Controller events, Program Change events, System Exclusive messages and Timing events from both MIDI devices and files. See also [[MIDI In Map CHOP]]. <br />
<br />
The MIDI In CHOP receives [[MIDI]] events from MIDI devices connected to the serial port, reads MIDI events internal to the workstation (i.e. the built-in software synth), and interprets musical scores in MIDI files. Supported MIDI events are: <br />
<br />
: Note On, Note Off <br />
: Polyphonic Aftertouch <br />
: Channel Pressure <br />
: Program Change <br />
: Control Change (MIDI controller devices) <br />
: Pitch Wheel <br />
: Timer Events including beat pulses <br />
: Bar Messages <br />
: Start, Stop, Continue <br />
: Song Position Pointer <br />
: System Exclusive Messages <br />
<br />
MIDI events arriving on separate MIDI channels may be recorded on separate CHOP channels. Also, any number of MIDI CHOPs can read from the same or different sources. TouchDesigner can be configured such that MIDI Start, Stop, or Continue events can control the [[Timeline]] and [[Beat Dialog]]. <br />
<br />
The 'Simplified Output' option creates a channel for every type of MIDI event received, so number of channels expands while the devices is being used. No need to specify name, channel and index patterns. <br />
<br />
'''Note''': The values of the MIDI inputs are saved into the TouchDesigner .toe file, and are restored when the file is reloaded. The physical controllers may be in a different position when the .toe is restarted, causing the values to jump when the controllers are moved. This is unavoidable. <br />
<br />
See also the [[MIDI In DAT]], [[MIDI Event DAT]], [[MIDI In Map CHOP]], [[MIDI Out CHOP]].<br />
|opLicense=Non-Commercial<br />
|opClass=midiinCHOP_Class<br />
|opLabel=MIDI In<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|short=The MIDI In CHOP reads Note events, Controller events, Program Change events, System Exclusive messages and Timing events from both MIDI devices and files.<br />
|opCategories=<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Source<br />
|items={{Parameter<br />
|parName=active<br />
|parOrder=0<br />
|parLabel=Active<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Enable or disable the MIDI In CHOP.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=source<br />
|parItems={{ParameterItem<br />
|itemName=device<br />
|opFamily=CHOP<br />
|parName=source<br />
|itemLabel=Device<br />
|itemSummary=The MIDI events come live from a device.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=file<br />
|opFamily=CHOP<br />
|parName=source<br />
|itemLabel=File<br />
|itemSummary=The MIDI events come from an existing file.<br />
}}<br />
|parOrder=1<br />
|parLabel=MIDI Source<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Get MIDI input from a device or a file.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=device<br />
|parOrder=2<br />
|parLabel=Device Table<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Path to the MIDI device [[Table DAT]]<br />
|parType=DAT<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=id<br />
|parOrder=3<br />
|parLabel=Device ID<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Specify the id of which device to use.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=file<br />
|parOrder=4<br />
|parLabel=MIDI File<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=If MIDI file is selected as the MIDI source use this field to specify the name of the MIDI file to read. The file can be read in from disk or from the web. Use http:// when specifying a URL.<br />
|parType=File<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=entire<br />
|parOrder=5<br />
|parLabel=Read Entire MIDI File<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=If enabled, the entire MIDI file is read. Otherwise, the Start and End parameters on the Channel page determine the segment of the file to read.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter|parName=resetchannels <br />
|parOrder=18 <br />
|parLabel=Reset Channels<br />
|opFamily=CHOP <br />
|opType=midiin <br />
|parSummary=Deletes all channels when set to On, new channels will not be added until Reset Channels is turned Off.<br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parName=resetchannelspulse <br />
|parOrder=19 <br />
|parLabel=Reset Channels Pulse <br />
|opFamily=CHOP <br />
|opType=midiin <br />
|parSummary=Instantly deletes all channels.<br />
|parType=Pulse<br />
|parReadOnly= <br />
|parItems= <br />
}}<br />
{{Parameter|parName=resetvalues <br />
|parOrder=18 <br />
|parLabel=Reset Values<br />
|opFamily=CHOP <br />
|opType=midiin <br />
|parSummary=Resets all channel values to 0 when On, channel values will not be updated until Reset Values is turned Off.<br />
|parType=<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parName=resetchannelspulse <br />
|parOrder=19 <br />
|parLabel=Reset Channels Pulse <br />
|opFamily=CHOP <br />
|opType=midiin <br />
|parSummary=Instantly resets all channels to 0.<br />
|parType=Pulse<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter<br />
|parName=simplified<br />
|parOrder=6<br />
|parLabel=Simplified Output<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=When this is on channels are automatically created when MIDI signal is detected from the selected MIDI device.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=preservepulses<br />
|parOrder=6<br />
|parLabel=Preserve Pulses<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=When on, quick value transitions (pulses) are spaced out over consecutive output samples. Use this option when pulse frequencies approach or exceed the timeline rate, otherwise they risk overlapping each other and being lost.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=onebased<br />
|parOrder=7<br />
|parLabel=1 Based Index<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Make the index 1 based instead of the default 0 based.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=channel<br />
|parOrder=8<br />
|parLabel=MIDI Channels<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The CHOP may read from any number of MIDI channels, numbered 1-16. Ranges and multiple entries are supported (i.e. "1 4 6", "1-7 12", "1-5:2"). <br />
<br />
: If Channel Prefix is left blank, then the input streams from multiple MIDI channels will be combined into one set of CHOP channels (i.e., a "note 64 on" event on channel 12 followed by a "note 64 off" event on channel 8 appears in the note 64 CHOP channel as a single note).<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=prefix<br />
|parOrder=9<br />
|parLabel=Channel Prefix<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=When recording from multiple MIDI channels, putting a string like "ch" in this parameter causes the MIDI channel to be split into separate CHOP channels per MIDI channel. Otherwise the MIDI channels are all merged into one set of CHOP channels.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Record<br />
|items={{Parameter<br />
|parName=recordtype<br />
|parItems={{ParameterItem<br />
|itemName=single<br />
|opFamily=CHOP<br />
|parName=recordtype<br />
|itemLabel=Single Frame<br />
|itemSummary=This only outputs the current value of notes, controllers, etc. It does not retain prior values. It creates a CHOP at frame 1 always, so the CHOP causes cooking only when MIDI events come in.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=current<br />
|opFamily=CHOP<br />
|parName=recordtype<br />
|itemLabel=Current Frame<br />
|itemSummary=Same as "Single Frame", but the CHOP frame is always at the current frame, so the CHOP changes every frame, causing other CHOPs to recook every frame.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=ind<br />
|opFamily=CHOP<br />
|parName=recordtype<br />
|itemLabel=Current Time Slice<br />
|itemSummary=The CHOP frame is always at the current [[Time Slice]].<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=timeline<br />
|opFamily=CHOP<br />
|parName=recordtype<br />
|itemLabel=Full Length<br />
|itemSummary=The entire length of the timeline is recorded.<br />
}}<br />
|parOrder=0<br />
|parLabel=Record Method<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Determine what to record.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=record<br />
|parOrder=1<br />
|parLabel=Record<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=This parameter is used as a button to start and stop recording into the CHOP channels.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=The parameters here are only enabled when 'Simplied Output' on the Source Page is Off.<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Note<br />
|items={{Parameter<br />
|parName=notename<br />
|1= notenumber (i.e. "n64").<br />
|parOrder=0<br />
|parLabel=Note Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Put an "n" in here to generate channels for note events. It is the base name of the CHOP channel used to record notes. If blank, notes are ignored. If the Note Output parameter is set to Separate Channels, then CHOP channels will be created for each note in the Note Scope, of the form: notename<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=notescope<br />
|parOrder=1<br />
|parLabel=Note Scope<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The scope of notes to record. Multiple ranges and notes can be recorded (i.e., "50-60", "64 65 66 70-80").<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=notemeth<br />
|parItems={{ParameterItem<br />
|itemName=mult<br />
|opFamily=CHOP<br />
|parName=notemeth<br />
|itemLabel=One Multiplexed Channel<br />
|itemSummary=One CHOP channel per MIDI channel is used for all notes. The value in the note channel is the number of the note currently playing (in the case of multiple notes playing, the most recent note is selected).<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=sep<br />
|opFamily=CHOP<br />
|parName=notemeth<br />
|itemLabel=Separate Channels<br />
|itemSummary=Each note number gets its own CHOP channel.<br />
}}<br />
|parOrder=2<br />
|parLabel=Note Output<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Describes how multiple notes are handled. (As one channel, or individual).<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=velocity<br />
|parItems={{ParameterItem<br />
|itemName=veloff<br />
|opFamily=CHOP<br />
|parName=velocity<br />
|itemLabel=Off<br />
|itemSummary=Velocity is not recorded.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=velencode<br />
|opFamily=CHOP<br />
|parName=velocity<br />
|itemLabel=Note Amplitude<br />
|itemSummary=The velocity is recorded as the amplitude of the note. Only valid when Note Output is set to Separate Channels.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=velsep<br />
|opFamily=CHOP<br />
|parName=velocity<br />
|itemLabel=Separate Channels<br />
|itemSummary=Velocity is recorded in separate CHOP channels. Each note channel will have a corresponding velocity channel.<br />
}}<br />
|parOrder=3<br />
|parLabel=Velocity<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Describes how multiple velocity events are recorded. (Separate channels or combined in one channel as separate samples).<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=velname<br />
|parOrder=4<br />
|parLabel=Velocity Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=When Velocity is set to Separate Channels, this parameter is the base name of the Velocity CHOP channel (try "v"). If blank, no velocity channels will be recorded.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=aftername<br />
|parOrder=5<br />
|parLabel=Aftertouch Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The base name of the polyphonic Aftertouch CHOP channels. One aftertouch channel is created for each note in the Note Scope. If blank, no aftertouch channels will be created.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=pressname<br />
|parOrder=6<br />
|parLabel=Pressure Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The name of the Channel Pressure channel. If multiple channels are being recorded, all channel pressure changes of interest will be recording on this CHOP channel. If blank, this channel will not be created.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=notenorm<br />
|parItems={{ParameterItem<br />
|itemName=off<br />
|opFamily=CHOP<br />
|parName=notenorm<br />
|itemLabel=None<br />
|itemSummary=When Normalize is Off, 7 bit controllers will return values in the range 0-127 and 14 bit controllers will return values in the range 0-16383.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=0to1<br />
|opFamily=CHOP<br />
|parName=notenorm<br />
|itemLabel=0 to 1<br />
|itemSummary=These values are normalized to lie in the range 0 to 1.<br />
}}<br />
|parOrder=7<br />
|parLabel=Normalize<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Note values can be normalized for convenience:<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=pitchname<br />
|parOrder=8<br />
|parLabel=Pitch Wheel Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The name of the Pitch Wheel CHOP channel. Pitch wheel values range from -1 to +1. If blank, this channel will not be created. Put "p" in here to generate a channel.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=The parameters here are only enabled when 'Simplied Output' on the Source Page is Off.<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Control<br />
|items={{Parameter<br />
|parName=controlname<br />
|parOrder=0<br />
|parLabel=Controller Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The base name of the Control Change CHOP channels. The channel names are appended with the controller index (0-127). If blank, control changes will not be recorded. It typically contains "c".<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=controltype<br />
|parItems={{ParameterItem<br />
|itemName=index<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=By Index Only<br />
|itemSummary=Specify the controller by its index, as opposed to specifying a specific type below.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n0<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Bank Select<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n1<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Modulation Wheel<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n2<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Breath Control<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n3<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Foot Controller<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n4<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Portamento Time<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n5<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Data Entry<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n6<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Channel Volume<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n7<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Balance<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n8<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Pan<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n9<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Expression Control<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n10<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Effect Control 1-2<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n11<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=14 bit General Purpose 1-4<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n12<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Sustain on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n13<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Portamento on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n14<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Sustenuto on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n15<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Soft Pedal on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n16<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Legato Footswitch on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n17<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Hold 2 on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n18<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Sound Controller 1-10<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n19<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=7 bit General Purpose 5-8<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n20<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Portamento Control<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n21<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Effect Depth 1-5<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n22<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Non-Registered Parameter<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n23<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Registered Parameter<br />
|itemSummary=<br />
}}<br />
|parOrder=1<br />
|parLabel=Controller Type<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=There are 128 different controllers available. By choosing By Index Only, you can specify any number of controllers in the Control Index parameter. Otherwise, you can select a controller from the list from this menu. Some controllers have multiple instances, such as Sound Controllers 1-10. Selecting a controller with multiple instances allows you to use the Control Index parameter to select which instances you want. Any invalid control indices will be ignored.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=controlind<br />
|parOrder=2<br />
|parLabel=Controller Index<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Used to select controllers by number, or multiple controllers by ranges. When in By Index Only Controller Type mode, you can select up to the full 128 controllers or sub-ranges thereof (i.e. "1-10", "2 34 70", "1-32 70-80:2").<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=format<br />
|parItems={{ParameterItem<br />
|itemName=7bit<br />
|opFamily=CHOP<br />
|parName=format<br />
|itemLabel=7 bit Controllers<br />
|itemSummary=Controllers are assumed to be regular 7 bit value messages.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=14bit<br />
|opFamily=CHOP<br />
|parName=format<br />
|itemLabel=14 bit Controllers<br />
|itemSummary=Controllers are received as two 7 bit value messages.<br />
}}<br />
|parOrder=3<br />
|parLabel=Controller Format<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Some controllers can be paired together to form 14 bit controllers, rather than the normal 7 bit controllers (controller indices 0-31, 98 and 100). Selecting 14 bit Controllers interprets a pair as one 14 bit controller. Otherwise, they are interpreted as separate 7 bit Controllers.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=norm<br />
|parItems={{ParameterItem<br />
|itemName=off<br />
|opFamily=CHOP<br />
|parName=norm<br />
|itemLabel=None<br />
|itemSummary=When Normalize is Off, 7 bit controllers will return values in the range 0-127 and 14 bit controllers will return values in the range 0-16383.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=0to1<br />
|opFamily=CHOP<br />
|parName=norm<br />
|itemLabel=0 to 1<br />
|itemSummary=These values are normalized to lie in the range 0 to 1.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=-1to1<br />
|opFamily=CHOP<br />
|parName=norm<br />
|itemLabel=-1 to 1<br />
|itemSummary=These values are normalized to lie in the range -1 to +1.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=onoff<br />
|opFamily=CHOP<br />
|parName=norm<br />
|itemLabel=On/Off<br />
|itemSummary=Several of the controllers are simply on/off states. When Convert to On/Off is enabled, values greater than or equal to 64 will be interpreted as "1" and all values less than 64 will be interpreted as "0".<br />
}}<br />
|parOrder=4<br />
|parLabel=Normalize<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Controller values can be normalized for convenience:<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=unwrap<br />
|parOrder=5<br />
|parLabel=Unwrap<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=When on, values do not jump between min and max, but are modified to be continuous ramps. Use with knob controllers for examples.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=progname<br />
|parOrder=6<br />
|parLabel=Program Change<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The name of the Program Change CHOP channel. All program change messages will be recorded onto this channel. If blank, this channel will not be created.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=The parameters here are only enabled when 'Simplied Output' on the Source Page is Off.<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Timer<br />
|pageSummary=The parameters here are only enabled when 'Simplied Output' on the Source Page is Off.<br />
|items={{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Timer Pulse Name<br />
|parName=pulsename<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=0<br />
|parSummary=Record timer pulse messages.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Timer Ramp Name<br />
|parName=rampname<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=1<br />
|parSummary=Record timer ramp messages.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Timer Period<br />
|parName=timerperiod<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=2<br />
|parSummary=Record timer period messages.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Timer Start<br />
|parName=timerstart<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=3<br />
|parSummary=Record timer start messages.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Ticks per Beat<br />
|parName=ticks<br />
|parType=Int<br />
|parReadOnly=<br />
|parOrder=4<br />
|parSummary=Specify the expected ticks per beat. This will influence the timer and bar output values.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Bar Ramp Name<br />
|parName=barname<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=5<br />
|parSummary=Output the current bar position.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Bar Period<br />
|parName=barperiod<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=6<br />
|parSummary=Output the current bar period events.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Bar Start<br />
|parName=barstart<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=7<br />
|parSummary=Output when a bar starts.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Bar Message<br />
|parName=barmsg<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=8<br />
|parSummary=Capture bar messages. Place a V in the message to specify which value the channel should have.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Song Pos Name<br />
|parName=songpos<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=9<br />
|parSummary=Capture song position messages.<br />
|parItems=<br />
}}<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Sys<br />
|items={{Parameter<br />
|parName=exname1<br />
|parOrder=0<br />
|parLabel=Channel Name 1<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Name of a specific exclusive message to be captured.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=exmsg1<br />
|parOrder=1<br />
|parLabel=Message 1<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Contents of the exclusive message. Place a V in the message to specify which value the channel should have.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=The parameters here are only enabled when 'Simplied Output' on the Source Page is Off.<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Chan<br />
|items={{Parameter<br />
|parName=start<br />
|parOrder=0<br />
|parLabel=Start<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Defines where recording begins. In "Tie to Time Line" mode, any events received before the start time will be ignored. In "Time Line Independent" mode, recording will start at this point and continue on (not looping back). If reading from a MIDI File, Start/End will determine the start of the segment to read. <br />
<br />
Start and end of the interval, expressed in Units (seconds, frames or samples). The parameters are expressed in the <code>Units</code> found on the Common page. To set the CHOP to be 100 samples long, Set <code>Units</code> to Samples, <code>Single Frame</code> Off and <code>Start</code> / <code>End</code> to 0 and 99.<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=startunit<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=startunit<br />
|itemLabel=I<br />
|itemName=samples<br />
|itemSummary=Use samples.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=startunit<br />
|itemLabel=F<br />
|itemName=frames<br />
|itemSummary=Use frames.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=startunit<br />
|itemLabel=S<br />
|itemName=seconds<br />
|itemSummary=Use seconds.<br />
}}<br />
|parOrder=1<br />
|parLabel=Start Unit<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Select the units to use for this parameter, Samples, Frames, or Seconds.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=end<br />
|parOrder=2<br />
|parLabel=End<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Defines the end of the segment to read for MIDI Files.<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=endunit<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=endunit<br />
|itemLabel=I<br />
|itemName=samples<br />
|itemSummary=Use samples.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=endunit<br />
|itemLabel=F<br />
|itemName=frames<br />
|itemSummary=Use frames.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=endunit<br />
|itemLabel=S<br />
|itemName=seconds<br />
|itemSummary=Use seconds.<br />
}}<br />
|parOrder=3<br />
|parLabel=End Unit<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Select the units to use for this parameter, Samples, Frames, or Seconds.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=rate<br />
|parOrder=4<br />
|parLabel=Sample Rate<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Defines the sample rate of this CHOP, in samples per second. If the sample rate is too low, a rapidly changing input may be misrepresented. <br />
<br />
'''Note''': If the sample rate is too low, you may miss MIDI events. A note event may set a sample value to 1, and then the next note event less than 1/30 second later can set it to 0 on the same sample in the CHOP channel. So the event will be missed. Make the sample rate higher, like 600, to catch these events, or make sure that your on-off events coming in are a minimum time separation, as can be achieved through Opcode's MAX.<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=left<br />
|parItems={{ParameterItem<br />
|itemName=hold<br />
|opFamily=CHOP<br />
|parName=left<br />
|itemLabel=Hold<br />
|itemSummary=Hold the current value of the channel.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=slope<br />
|opFamily=CHOP<br />
|parName=left<br />
|itemLabel=Slope<br />
|itemSummary=Continue the slope before the start of the channel.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=cycle<br />
|opFamily=CHOP<br />
|parName=left<br />
|itemLabel=Cycle<br />
|itemSummary=Cycle the channel repeatedly.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=mirror<br />
|opFamily=CHOP<br />
|parName=left<br />
|itemLabel=Mirror<br />
|itemSummary=Cycle the channel repeatedly, mirroring every other cycle.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=default<br />
|opFamily=CHOP<br />
|parName=left<br />
|itemLabel=Default Value<br />
|itemSummary=Use the constant value specified in the Default Value parameter.<br />
}}<br />
|parOrder=5<br />
|parLabel=Extend Left<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The left extend conditions (before range).<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=right<br />
|parItems={{ParameterItem<br />
|itemName=hold<br />
|opFamily=CHOP<br />
|parName=right<br />
|itemLabel=Hold<br />
|itemSummary=Hold the current value of the channel.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=slope<br />
|opFamily=CHOP<br />
|parName=right<br />
|itemLabel=Slope<br />
|itemSummary=Continue the slope after the end of the channel.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=cycle<br />
|opFamily=CHOP<br />
|parName=right<br />
|itemLabel=Cycle<br />
|itemSummary=Cycle the channel repeatedly.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=mirror<br />
|opFamily=CHOP<br />
|parName=right<br />
|itemLabel=Mirror<br />
|itemSummary=Cycle the channel repeatedly, mirroring every other cycle.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=default<br />
|opFamily=CHOP<br />
|parName=right<br />
|itemLabel=Default Value<br />
|itemSummary=Use the constant value specified in the Default Value parameter.<br />
}}<br />
|parOrder=6<br />
|parLabel=Extend Right<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The right extend conditions (after range).<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=defval<br />
|parOrder=7<br />
|parLabel=Default Value<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The value used for the Default Value extend condition. <br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=This is similar to other generators' Channel page. However, there are a few points to consider on how they affect the Midi In CHOP.<br />
}}<br />
{{:CHOP Generator Common Page}}<br />
<br />
{{InfoCHOPChannels<br />
|opFamily=CHOP<br />
|opLabel=MIDI In<br />
|infoChannels=}}<br />
{{History}}<br />
{{CHOPNavBox|opFamily=CHOP}}<br />
{{#invoke:Category|list|CHOPs}}</div>Robhttps://docs.derivative.ca/index.php?title=MIDI_In_CHOP&diff=27318MIDI In CHOP2022-07-22T16:44:17Z<p>Rob: </p>
<hr />
<div>{{Summary<br />
|opFilter=False<br />
|long=The MIDI In CHOP reads Note events, Controller events, Program Change events, System Exclusive messages and Timing events from both MIDI devices and files. See also [[MIDI In Map CHOP]]. <br />
<br />
The MIDI In CHOP receives [[MIDI]] events from MIDI devices connected to the serial port, reads MIDI events internal to the workstation (i.e. the built-in software synth), and interprets musical scores in MIDI files. Supported MIDI events are: <br />
<br />
: Note On, Note Off <br />
: Polyphonic Aftertouch <br />
: Channel Pressure <br />
: Program Change <br />
: Control Change (MIDI controller devices) <br />
: Pitch Wheel <br />
: Timer Events including beat pulses <br />
: Bar Messages <br />
: Start, Stop, Continue <br />
: Song Position Pointer <br />
: System Exclusive Messages <br />
<br />
MIDI events arriving on separate MIDI channels may be recorded on separate CHOP channels. Also, any number of MIDI CHOPs can read from the same or different sources. TouchDesigner can be configured such that MIDI Start, Stop, or Continue events can control the [[Timeline]] and [[Beat Dialog]]. <br />
<br />
The 'Simplified Output' option creates a channel for every type of MIDI event received, so number of channels expands while the devices is being used. No need to specify name, channel and index patterns. <br />
<br />
'''Note''': The values of the MIDI inputs are saved into the TouchDesigner .toe file, and are restored when the file is reloaded. The physical controllers may be in a different position when the .toe is restarted, causing the values to jump when the controllers are moved. This is unavoidable. <br />
<br />
See also the [[MIDI In DAT]], [[MIDI Event DAT]], [[MIDI In Map CHOP]], [[MIDI Out CHOP]].<br />
|opLicense=Non-Commercial<br />
|opClass=midiinCHOP_Class<br />
|opLabel=MIDI In<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|short=The MIDI In CHOP reads Note events, Controller events, Program Change events, System Exclusive messages and Timing events from both MIDI devices and files.<br />
|opCategories=<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Source<br />
|items={{Parameter<br />
|parName=active<br />
|parOrder=0<br />
|parLabel=Active<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Enable or disable the MIDI In CHOP.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=source<br />
|parItems={{ParameterItem<br />
|itemName=device<br />
|opFamily=CHOP<br />
|parName=source<br />
|itemLabel=Device<br />
|itemSummary=The MIDI events come live from a device.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=file<br />
|opFamily=CHOP<br />
|parName=source<br />
|itemLabel=File<br />
|itemSummary=The MIDI events come from an existing file.<br />
}}<br />
|parOrder=1<br />
|parLabel=MIDI Source<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Get MIDI input from a device or a file.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=device<br />
|parOrder=2<br />
|parLabel=Device Table<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Path to the MIDI device [[Table DAT]]<br />
|parType=DAT<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=id<br />
|parOrder=3<br />
|parLabel=Device ID<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Specify the id of which device to use.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=file<br />
|parOrder=4<br />
|parLabel=MIDI File<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=If MIDI file is selected as the MIDI source use this field to specify the name of the MIDI file to read. The file can be read in from disk or from the web. Use http:// when specifying a URL.<br />
|parType=File<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=entire<br />
|parOrder=5<br />
|parLabel=Read Entire MIDI File<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=If enabled, the entire MIDI file is read. Otherwise, the Start and End parameters on the Channel page determine the segment of the file to read.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter|parName=resetchannels <br />
|parOrder=18 <br />
|parLabel=Reset Channels<br />
|opFamily=CHOP <br />
|opType=midiin <br />
|parSummary=Deletes all channels when set to On, new channels will not be added until Reset Channels is turned Off.<br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parName=resetchannelspulse <br />
|parOrder=19 <br />
|parLabel=Reset Channels Pulse <br />
|opFamily=CHOP <br />
|opType=midiin <br />
|parSummary=Instantly deletes all channels.<br />
|parType=Pulse<br />
|parReadOnly= <br />
|parItems= <br />
}}<br />
{{Parameter|parName=resetvalues <br />
|parOrder=18 <br />
|parLabel=Reset Values<br />
|opFamily=CHOP <br />
|opType=midiin <br />
|parSummary=Resets all channel values to 0 when On, channel values will not be updated until Reset Values is turned Off.<br />
|parType=<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|parName=resetchannelspulse <br />
|parOrder=19 <br />
|parLabel=Reset Channels Pulse <br />
|opFamily=CHOP <br />
|opType=midiin <br />
|parSummary=Instantly resets all channels to 0.<br />
|parType=Pulse<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter<br />
|parName=simplified<br />
|parOrder=6<br />
|parLabel=Simplified Output<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=When this is on channels are automatically created when MIDI signal is detected from the selected MIDI device.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=preservepulses<br />
|parOrder=6<br />
|parLabel=Preserve Pulses<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=When on, quick value transitions (pulses) are spaced out over consecutive output samples. Use this option when pulse frequencies approach or exceed the timeline rate, otherwise they risk overlapping each other and being lost.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=onebased<br />
|parOrder=7<br />
|parLabel=1 Based Index<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Make the index 1 based instead of the default 0 based.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=channel<br />
|parOrder=8<br />
|parLabel=MIDI Channels<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The CHOP may read from any number of MIDI channels, numbered 1-16. Ranges and multiple entries are supported (i.e. "1 4 6", "1-7 12", "1-5:2"). <br />
<br />
: If Channel Prefix is left blank, then the input streams from multiple MIDI channels will be combined into one set of CHOP channels (i.e., a "note 64 on" event on channel 12 followed by a "note 64 off" event on channel 8 appears in the note 64 CHOP channel as a single note).<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=prefix<br />
|parOrder=9<br />
|parLabel=Channel Prefix<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=When recording from multiple MIDI channels, putting a string like "ch" in this parameter causes the MIDI channel to be split into separate CHOP channels per MIDI channel. Otherwise the MIDI channels are all merged into one set of CHOP channels.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Record<br />
|items={{Parameter<br />
|parName=recordtype<br />
|parItems={{ParameterItem<br />
|itemName=single<br />
|opFamily=CHOP<br />
|parName=recordtype<br />
|itemLabel=Single Frame<br />
|itemSummary=This only outputs the current value of notes, controllers, etc. It does not retain prior values. It creates a CHOP at frame 1 always, so the CHOP causes cooking only when MIDI events come in.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=current<br />
|opFamily=CHOP<br />
|parName=recordtype<br />
|itemLabel=Current Frame<br />
|itemSummary=Same as "Single Frame", but the CHOP frame is always at the current frame, so the CHOP changes every frame, causing other CHOPs to recook every frame.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=ind<br />
|opFamily=CHOP<br />
|parName=recordtype<br />
|itemLabel=Current Time Slice<br />
|itemSummary=The CHOP frame is always at the current [[Time Slice]].<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=timeline<br />
|opFamily=CHOP<br />
|parName=recordtype<br />
|itemLabel=Full Length<br />
|itemSummary=The entire length of the timeline is recorded.<br />
}}<br />
|parOrder=0<br />
|parLabel=Record Method<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Determine what to record.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=record<br />
|parOrder=1<br />
|parLabel=Record<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=This parameter is used as a button to start and stop recording into the CHOP channels.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=The parameters here are only enabled when 'Simplied Output' on the Source Page is Off.<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Note<br />
|items={{Parameter<br />
|parName=notename<br />
|1= notenumber (i.e. "n64").<br />
|parOrder=0<br />
|parLabel=Note Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Put an "n" in here to generate channels for note events. It is the base name of the CHOP channel used to record notes. If blank, notes are ignored. If the Note Output parameter is set to Separate Channels, then CHOP channels will be created for each note in the Note Scope, of the form: notename<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=notescope<br />
|parOrder=1<br />
|parLabel=Note Scope<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The scope of notes to record. Multiple ranges and notes can be recorded (i.e., "50-60", "64 65 66 70-80").<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=notemeth<br />
|parItems={{ParameterItem<br />
|itemName=mult<br />
|opFamily=CHOP<br />
|parName=notemeth<br />
|itemLabel=One Multiplexed Channel<br />
|itemSummary=One CHOP channel per MIDI channel is used for all notes. The value in the note channel is the number of the note currently playing (in the case of multiple notes playing, the most recent note is selected).<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=sep<br />
|opFamily=CHOP<br />
|parName=notemeth<br />
|itemLabel=Separate Channels<br />
|itemSummary=Each note number gets its own CHOP channel.<br />
}}<br />
|parOrder=2<br />
|parLabel=Note Output<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Describes how multiple notes are handled. (As one channel, or individual).<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=velocity<br />
|parItems={{ParameterItem<br />
|itemName=veloff<br />
|opFamily=CHOP<br />
|parName=velocity<br />
|itemLabel=Off<br />
|itemSummary=Velocity is not recorded.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=velencode<br />
|opFamily=CHOP<br />
|parName=velocity<br />
|itemLabel=Note Amplitude<br />
|itemSummary=The velocity is recorded as the amplitude of the note. Only valid when Note Output is set to Separate Channels.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=velsep<br />
|opFamily=CHOP<br />
|parName=velocity<br />
|itemLabel=Separate Channels<br />
|itemSummary=Velocity is recorded in separate CHOP channels. Each note channel will have a corresponding velocity channel.<br />
}}<br />
|parOrder=3<br />
|parLabel=Velocity<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Describes how multiple velocity events are recorded. (Separate channels or combined in one channel as separate samples).<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=velname<br />
|parOrder=4<br />
|parLabel=Velocity Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=When Velocity is set to Separate Channels, this parameter is the base name of the Velocity CHOP channel (try "v"). If blank, no velocity channels will be recorded.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=aftername<br />
|parOrder=5<br />
|parLabel=Aftertouch Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The base name of the polyphonic Aftertouch CHOP channels. One aftertouch channel is created for each note in the Note Scope. If blank, no aftertouch channels will be created.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=pressname<br />
|parOrder=6<br />
|parLabel=Pressure Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The name of the Channel Pressure channel. If multiple channels are being recorded, all channel pressure changes of interest will be recording on this CHOP channel. If blank, this channel will not be created.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=notenorm<br />
|parItems={{ParameterItem<br />
|itemName=off<br />
|opFamily=CHOP<br />
|parName=notenorm<br />
|itemLabel=None<br />
|itemSummary=When Normalize is Off, 7 bit controllers will return values in the range 0-127 and 14 bit controllers will return values in the range 0-16383.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=0to1<br />
|opFamily=CHOP<br />
|parName=notenorm<br />
|itemLabel=0 to 1<br />
|itemSummary=These values are normalized to lie in the range 0 to 1.<br />
}}<br />
|parOrder=7<br />
|parLabel=Normalize<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Note values can be normalized for convenience:<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=pitchname<br />
|parOrder=8<br />
|parLabel=Pitch Wheel Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The name of the Pitch Wheel CHOP channel. Pitch wheel values range from -1 to +1. If blank, this channel will not be created. Put "p" in here to generate a channel.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=The parameters here are only enabled when 'Simplied Output' on the Source Page is Off.<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Control<br />
|items={{Parameter<br />
|parName=controlname<br />
|parOrder=0<br />
|parLabel=Controller Name<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The base name of the Control Change CHOP channels. The channel names are appended with the controller index (0-127). If blank, control changes will not be recorded. It typically contains "c".<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=controltype<br />
|parItems={{ParameterItem<br />
|itemName=index<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=By Index Only<br />
|itemSummary=Specify the controller by its index, as opposed to specifying a specific type below.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n0<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Bank Select<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n1<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Modulation Wheel<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n2<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Breath Control<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n3<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Foot Controller<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n4<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Portamento Time<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n5<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Data Entry<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n6<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Channel Volume<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n7<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Balance<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n8<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Pan<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n9<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Expression Control<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n10<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Effect Control 1-2<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n11<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=14 bit General Purpose 1-4<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n12<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Sustain on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n13<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Portamento on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n14<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Sustenuto on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n15<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Soft Pedal on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n16<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Legato Footswitch on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n17<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Hold 2 on/off<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n18<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Sound Controller 1-10<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n19<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=7 bit General Purpose 5-8<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n20<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Portamento Control<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n21<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Effect Depth 1-5<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n22<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Non-Registered Parameter<br />
|itemSummary=<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=n23<br />
|opFamily=CHOP<br />
|parName=controltype<br />
|itemLabel=Registered Parameter<br />
|itemSummary=<br />
}}<br />
|parOrder=1<br />
|parLabel=Controller Type<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=There are 128 different controllers available. By choosing By Index Only, you can specify any number of controllers in the Control Index parameter. Otherwise, you can select a controller from the list from this menu. Some controllers have multiple instances, such as Sound Controllers 1-10. Selecting a controller with multiple instances allows you to use the Control Index parameter to select which instances you want. Any invalid control indices will be ignored.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=controlind<br />
|parOrder=2<br />
|parLabel=Controller Index<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Used to select controllers by number, or multiple controllers by ranges. When in By Index Only Controller Type mode, you can select up to the full 128 controllers or sub-ranges thereof (i.e. "1-10", "2 34 70", "1-32 70-80:2").<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=format<br />
|parItems={{ParameterItem<br />
|itemName=7bit<br />
|opFamily=CHOP<br />
|parName=format<br />
|itemLabel=7 bit Controllers<br />
|itemSummary=Controllers are assumed to be regular 7 bit value messages.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=14bit<br />
|opFamily=CHOP<br />
|parName=format<br />
|itemLabel=14 bit Controllers<br />
|itemSummary=Controllers are received as two 7 bit value messages.<br />
}}<br />
|parOrder=3<br />
|parLabel=Controller Format<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Some controllers can be paired together to form 14 bit controllers, rather than the normal 7 bit controllers (controller indices 0-31, 98 and 100). Selecting 14 bit Controllers interprets a pair as one 14 bit controller. Otherwise, they are interpreted as separate 7 bit Controllers.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=norm<br />
|parItems={{ParameterItem<br />
|itemName=off<br />
|opFamily=CHOP<br />
|parName=norm<br />
|itemLabel=None<br />
|itemSummary=When Normalize is Off, 7 bit controllers will return values in the range 0-127 and 14 bit controllers will return values in the range 0-16383.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=0to1<br />
|opFamily=CHOP<br />
|parName=norm<br />
|itemLabel=0 to 1<br />
|itemSummary=These values are normalized to lie in the range 0 to 1.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=-1to1<br />
|opFamily=CHOP<br />
|parName=norm<br />
|itemLabel=-1 to 1<br />
|itemSummary=These values are normalized to lie in the range -1 to +1.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=onoff<br />
|opFamily=CHOP<br />
|parName=norm<br />
|itemLabel=On/Off<br />
|itemSummary=Several of the controllers are simply on/off states. When Convert to On/Off is enabled, values greater than or equal to 64 will be interpreted as "1" and all values less than 64 will be interpreted as "0".<br />
}}<br />
|parOrder=4<br />
|parLabel=Normalize<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Controller values can be normalized for convenience:<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=unwrap<br />
|parOrder=5<br />
|parLabel=Unwrap<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=When on, values do not jump between min and max, but are modified to be continuous ramps. Use with knob controllers for examples.<br />
|parType=Toggle<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=progname<br />
|parOrder=6<br />
|parLabel=Program Change<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The name of the Program Change CHOP channel. All program change messages will be recorded onto this channel. If blank, this channel will not be created.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=The parameters here are only enabled when 'Simplied Output' on the Source Page is Off.<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Timer<br />
|pageSummary=The parameters here are only enabled when 'Simplied Output' on the Source Page is Off.<br />
|items={{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Timer Pulse Name<br />
|parName=pulsename<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=0<br />
|parSummary=Record timer pulse messages.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Timer Ramp Name<br />
|parName=rampname<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=1<br />
|parSummary=Record timer ramp messages.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Timer Period<br />
|parName=timerperiod<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=2<br />
|parSummary=Record timer period messages.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Timer Start<br />
|parName=timerstart<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=3<br />
|parSummary=Record timer start messages.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Ticks per Beat<br />
|parName=ticks<br />
|parType=Int<br />
|parReadOnly=<br />
|parOrder=4<br />
|parSummary=Specify the expected ticks per beat. This will influence the timer and bar output values.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Bar Ramp Name<br />
|parName=barname<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=5<br />
|parSummary=Output the current bar position.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Bar Period<br />
|parName=barperiod<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=6<br />
|parSummary=Output the current bar period events.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Bar Start<br />
|parName=barstart<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=7<br />
|parSummary=Output when a bar starts.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Bar Message<br />
|parName=barmsg<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=8<br />
|parSummary=Capture bar messages. Place a V in the message to specify which value the channel should have.<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|opFamily=CHOP<br />
|opType=midiinCHOP<br />
|parLabel=Song Pos Name<br />
|parName=songpos<br />
|parType=Str<br />
|parReadOnly=<br />
|parOrder=9<br />
|parSummary=<br />
|parItems=<br />
}}<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Sys<br />
|items={{Parameter<br />
|parName=exname1<br />
|parOrder=0<br />
|parLabel=Channel Name 1<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Name of a specific exclusive message to be captured.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=exmsg1<br />
|parOrder=1<br />
|parLabel=Message 1<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Contents of the exclusive message. Place a V in the message to specify which value the channel should have.<br />
|parType=Str<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=The parameters here are only enabled when 'Simplied Output' on the Source Page is Off.<br />
}}<br />
{{ParameterPage<br />
|opFamily=CHOP<br />
|pageName=Chan<br />
|items={{Parameter<br />
|parName=start<br />
|parOrder=0<br />
|parLabel=Start<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Defines where recording begins. In "Tie to Time Line" mode, any events received before the start time will be ignored. In "Time Line Independent" mode, recording will start at this point and continue on (not looping back). If reading from a MIDI File, Start/End will determine the start of the segment to read. <br />
<br />
Start and end of the interval, expressed in Units (seconds, frames or samples). The parameters are expressed in the <code>Units</code> found on the Common page. To set the CHOP to be 100 samples long, Set <code>Units</code> to Samples, <code>Single Frame</code> Off and <code>Start</code> / <code>End</code> to 0 and 99.<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=startunit<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=startunit<br />
|itemLabel=I<br />
|itemName=samples<br />
|itemSummary=Use samples.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=startunit<br />
|itemLabel=F<br />
|itemName=frames<br />
|itemSummary=Use frames.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=startunit<br />
|itemLabel=S<br />
|itemName=seconds<br />
|itemSummary=Use seconds.<br />
}}<br />
|parOrder=1<br />
|parLabel=Start Unit<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Select the units to use for this parameter, Samples, Frames, or Seconds.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=end<br />
|parOrder=2<br />
|parLabel=End<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Defines the end of the segment to read for MIDI Files.<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=endunit<br />
|parItems={{ParameterItem<br />
|opFamily=CHOP<br />
|parName=endunit<br />
|itemLabel=I<br />
|itemName=samples<br />
|itemSummary=Use samples.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=endunit<br />
|itemLabel=F<br />
|itemName=frames<br />
|itemSummary=Use frames.<br />
}}<!--<br />
-->{{ParameterItem<br />
|opFamily=CHOP<br />
|parName=endunit<br />
|itemLabel=S<br />
|itemName=seconds<br />
|itemSummary=Use seconds.<br />
}}<br />
|parOrder=3<br />
|parLabel=End Unit<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Select the units to use for this parameter, Samples, Frames, or Seconds.<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=rate<br />
|parOrder=4<br />
|parLabel=Sample Rate<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=Defines the sample rate of this CHOP, in samples per second. If the sample rate is too low, a rapidly changing input may be misrepresented. <br />
<br />
'''Note''': If the sample rate is too low, you may miss MIDI events. A note event may set a sample value to 1, and then the next note event less than 1/30 second later can set it to 0 on the same sample in the CHOP channel. So the event will be missed. Make the sample rate higher, like 600, to catch these events, or make sure that your on-off events coming in are a minimum time separation, as can be achieved through Opcode's MAX.<br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
{{Parameter<br />
|parName=left<br />
|parItems={{ParameterItem<br />
|itemName=hold<br />
|opFamily=CHOP<br />
|parName=left<br />
|itemLabel=Hold<br />
|itemSummary=Hold the current value of the channel.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=slope<br />
|opFamily=CHOP<br />
|parName=left<br />
|itemLabel=Slope<br />
|itemSummary=Continue the slope before the start of the channel.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=cycle<br />
|opFamily=CHOP<br />
|parName=left<br />
|itemLabel=Cycle<br />
|itemSummary=Cycle the channel repeatedly.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=mirror<br />
|opFamily=CHOP<br />
|parName=left<br />
|itemLabel=Mirror<br />
|itemSummary=Cycle the channel repeatedly, mirroring every other cycle.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=default<br />
|opFamily=CHOP<br />
|parName=left<br />
|itemLabel=Default Value<br />
|itemSummary=Use the constant value specified in the Default Value parameter.<br />
}}<br />
|parOrder=5<br />
|parLabel=Extend Left<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The left extend conditions (before range).<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=right<br />
|parItems={{ParameterItem<br />
|itemName=hold<br />
|opFamily=CHOP<br />
|parName=right<br />
|itemLabel=Hold<br />
|itemSummary=Hold the current value of the channel.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=slope<br />
|opFamily=CHOP<br />
|parName=right<br />
|itemLabel=Slope<br />
|itemSummary=Continue the slope after the end of the channel.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=cycle<br />
|opFamily=CHOP<br />
|parName=right<br />
|itemLabel=Cycle<br />
|itemSummary=Cycle the channel repeatedly.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=mirror<br />
|opFamily=CHOP<br />
|parName=right<br />
|itemLabel=Mirror<br />
|itemSummary=Cycle the channel repeatedly, mirroring every other cycle.<br />
}}<!--<br />
-->{{ParameterItem<br />
|itemName=default<br />
|opFamily=CHOP<br />
|parName=right<br />
|itemLabel=Default Value<br />
|itemSummary=Use the constant value specified in the Default Value parameter.<br />
}}<br />
|parOrder=6<br />
|parLabel=Extend Right<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The right extend conditions (after range).<br />
|parType=Menu<br />
|parReadOnly=<br />
}}<br />
{{Parameter<br />
|parName=defval<br />
|parOrder=7<br />
|parLabel=Default Value<br />
|opFamily=CHOP<br />
|opType=midiin<br />
|parSummary=The value used for the Default Value extend condition. <br />
|parType=Float<br />
|parReadOnly=<br />
|parItems=<br />
}}<br />
|pageSummary=This is similar to other generators' Channel page. However, there are a few points to consider on how they affect the Midi In CHOP.<br />
}}<br />
{{:CHOP Generator Common Page}}<br />
<br />
{{InfoCHOPChannels<br />
|opFamily=CHOP<br />
|opLabel=MIDI In<br />
|infoChannels=}}<br />
{{History}}<br />
{{CHOPNavBox|opFamily=CHOP}}<br />
{{#invoke:Category|list|CHOPs}}</div>Robhttps://docs.derivative.ca/index.php?title=Inverse_Curve_CHOP&diff=27317Inverse Curve CHOP2022-07-22T16:24:55Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opFilter=False <br />
|long=The Inverse Curve CHOP calculates an inverse kinematics simulation for [[Bone COMP |bone objects]] using a curve object. <br />
<br />
The Inverse Curve CHOP will stretch and position a set of bones to follow a curve defined by another set of [[object]]s (guide). <br />
<br />
Specify the first and last bone in the chain with Bone Start / Bone End. <br />
<br />
Specify the Guide by listing them in order, space separated, in the Guide Components field. This parameter also accepts patterns and wildcards. Example: <code>null[1-5] null17 null4</code>. You can also specify bones in this group as well. <br />
<br />
The CHOP will then create a set of rotate and bone-length channels for each bone. Additionally, the CHOP will also output 3 translate channels for the first bone in the chain. It will also setup the export links automatically, so you just have to turn on the export flag for this CHOP. <br />
<br />
The way the CHOP solves this system is by creating a guide curve between the supplied Guide objects. Use the Interpolation and Order parameters to define what type of curve it will use. By default, the control vertices of the curve will be the centroids of the object. The curve is also given orientation, by adopting the orientation of each guide object. The bones line up their X axes with this orientation. <br />
<br />
You can view this curve by using the [[Inverse Curve SOP]]. Just supply it with the name of the Inverse Curve CHOP and it will extract the geometry for viewing/debugging purposes. It actually will contain 3 curves (the original guide, and the guide displaced in +X and +Y). These curves can be skinned with a [[Skin SOP]] for better feedback, etc. <br />
<br />
The span parameters can be used to trim out the beginning and end of the guide curve if so needed. For example Span 0.3 0.7 will lay the bones along the middle 40% of the curve. <br />
<br />
In the rare case that the user has setup a curve with all the X axes (twists) pointing along the same direction of the curve, then the Up Vector parameter is used to break the tie, so to speak. However, this curve setup is likely degenerate to start with and should be avoided by twisting all the objects 90 degrees. <br />
|opLabel=Inverse Curve <br />
|opClass=inversecurveCHOP_Class <br />
|opType=inversecurve <br />
|opLicense=Non-Commercial <br />
|opFamily=CHOP <br />
|short=The Inverse Curve CHOP calculates an inverse kinematics simulation for [[Bone COMP |bone objects]] using a curve object. <br />
|opCategories= <br />
}} <br />
{{ParameterPage <br />
|pageName=Inverse Curve <br />
|pageSummary= <br />
|opFamily=CHOP <br />
|items= <br />
{{Parameter|parOrder=0 <br />
|parSummary=The set of objects describing the curve. <br />
|opType=inversecurve <br />
|parName=guide <br />
|opFamily=CHOP <br />
|parLabel=Guide Components <br />
|parType=Object<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|parOrder=1 <br />
|parSummary=The first bone in the chain to place. <br />
|opType=inversecurve <br />
|parName=bonestart <br />
|opFamily=CHOP <br />
|parLabel=Bone Start <br />
|parType=Object<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|parOrder=2 <br />
|parSummary=The last bone in the chain to place. <br />
|opType=inversecurve <br />
|parName=boneend <br />
|opFamily=CHOP <br />
|parLabel=Bone End <br />
|parType=Object<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|parOrder=3 <br />
|parSummary= <br />
|opType=inversecurve <br />
|parName=span <br />
|opFamily=CHOP <br />
|parLabel=Span <br />
|parItems= <br />
{{ParameterItem|itemLabel=""<br />
|itemName=span1<br />
|parName=span<br />
|itemSummary=The beginning fraction of the guide curve to align to.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=""<br />
|itemName=span2<br />
|parName=span<br />
|itemSummary=The end fraction of the guide curve to align to.<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Float<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=4 <br />
|parSummary=The type of guide curve to create with the guide components. <br />
|opType=inversecurve <br />
|parName=interpolation <br />
|opFamily=CHOP <br />
|parLabel=Interpolation <br />
|parItems= <br />
{{ParameterItem|itemLabel=Polygonal Curve<br />
|itemName=polygon<br />
|parName=interpolation<br />
|itemSummary=Create a polygon, with a vertex at each guide component.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Bezier Curve<br />
|itemName=bezier<br />
|parName=interpolation<br />
|itemSummary=Create a Bezier curve, with a control point at each guide component.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=NURBS Curve<br />
|itemName=nurbs<br />
|parName=interpolation<br />
|itemSummary=Create a NURBs curve, with a control point at each guide component.<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=5 <br />
|parSummary=The curve order when using NURBs or Bezier interpolation. <br />
|opType=inversecurve <br />
|parName=order <br />
|opFamily=CHOP <br />
|parLabel=Order <br />
|parType=Int<br />
|parReadOnly= <br />
|parItems=}} <br />
{{Parameter|parOrder=6 <br />
|parSummary=Control bone twist with this parameter. <br />
|opType=inversecurve <br />
|parName=upvector <br />
|opFamily=CHOP <br />
|parLabel=Up Vector <br />
|parItems= <br />
{{ParameterItem|itemLabel=X<br />
|itemName=upvectorx<br />
|parName=upvector<br />
|itemSummary=X component of up vector.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Y<br />
|itemName=upvectory<br />
|parName=upvector<br />
|itemSummary=Y component of up vector.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Z<br />
|itemName=upvectorz<br />
|parName=upvector<br />
|itemSummary=Z component of up vector.<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=XYZ<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=7 <br />
|parSummary=Export the calculated transform values directly onto the bone chain parameters. <br />
|opType=inversecurve <br />
|parName=mapexports <br />
|opFamily=CHOP <br />
|parLabel=Map Exports <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems=}} <br />
<br />
}} <br />
{{:CHOP Generator Common Page <br />
}} <br />
{{InputsPage<br />
|opFamily=CHOP<br />
|opInputs={{OPInput<br />
|opFamily=CHOP<br />
|inputIndex=0<br />
|inputName=<br />
|inputSummary=<br />
}}<br />
}}<br />
{{InfoCHOPChannels<br />
|opFamily=CHOP<br />
|opLabel=Inverse Curve<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{CHOPNavBox <br />
|opFamily=CHOP <br />
}} <br />
{{#invoke:Category <br />
|list|CHOPs}}</div>Robhttps://docs.derivative.ca/index.php?title=Interpolate_CHOP&diff=27316Interpolate CHOP2022-07-22T15:40:12Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opFilter=True <br />
|long=The Interpolate CHOP treats its multiple-inputs as keyframes and interpolates between them. The inputs are usually single-frame CHOP channels like those produced by a [[Constant CHOP]]. The Interpolate CHOP first sorts the input CHOPs in time (without shifting them) and interpolates between them to fill the gaps. <br />
<br />
The number of channels in the output is the same as the number of channels in the first input. <br />
<br />
If a channel is missing in an input, and Match By is set to Channel Name, it is treated as if there is no keyframe at that frame for that channel, and the interpolation occurs between CHOPs before and after that frame. <br />
|opLabel=Interpolate <br />
|opClass=interpolateCHOP_Class <br />
|opType=interp <br />
|opLicense=Non-Commercial <br />
|opFamily=CHOP <br />
|short=The Interpolate CHOP treats its multiple-inputs as keyframes and interpolates between them. <br />
|opCategories= <br />
}} <br />
{{ParameterPage <br />
|pageName=Interpolate <br />
|pageSummary= <br />
|opFamily=CHOP <br />
|items= <br />
{{Parameter|parOrder=0 <br />
|parSummary=The shape of the interpolation curve: <br />
|opType=interp <br />
|parName=blendfunc <br />
|opFamily=CHOP <br />
|parLabel=Shape <br />
|parItems= <br />
{{ParameterItem|itemLabel=Linear<br />
|itemName=lin<br />
|parName=blendfunc<br />
|itemSummary=A straight line.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Ease in<br />
|itemName=ei<br />
|parName=blendfunc<br />
|itemSummary=Exponential rise.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Ease out<br />
|itemName=eo<br />
|parName=blendfunc<br />
|itemSummary=Exponential fall.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Ease in Ease out<br />
|itemName=cos<br />
|parName=blendfunc<br />
|itemSummary=Half cosine blend.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Cubic<br />
|itemName=cub<br />
|parName=blendfunc<br />
|itemSummary=A cubic spline.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Add<br />
|itemName=add<br />
|parName=blendfunc<br />
|itemSummary=Overlapping parts, if any, are added.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Hold Previous<br />
|itemName=holdprev<br />
|parName=blendfunc<br />
|itemSummary=<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=1 <br />
|parSummary=If an input is not a single frame, and if there are overlaps in the input CHOPs, an option is used to resolve the conflict. <br />
|opType=interp <br />
|parName=overlap <br />
|opFamily=CHOP <br />
|parLabel=Overlap Priority <br />
|parItems= <br />
{{ParameterItem|itemLabel=Average Overlaps<br />
|itemName=avg<br />
|parName=overlap<br />
|itemSummary=Combine the conflicting channels by averaging them.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=First Segment has Priority<br />
|itemName=first<br />
|parName=overlap<br />
|itemSummary=Use the segment with the earliest start time.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Last Segment has Priority<br />
|itemName=last<br />
|parName=overlap<br />
|itemSummary=Use the segment with the latest start time.<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|parOrder=2 <br />
|parSummary=Specify how to match the channels of each input. <br />
|opType=interp <br />
|parName=match <br />
|opFamily=CHOP <br />
|parLabel=Match by <br />
|parItems= <br />
{{ParameterItem|itemLabel=Channel Number<br />
|itemName=index<br />
|parName=match<br />
|itemSummary=Ignore channel names, and simply pair them in order.<br />
|opFamily=CHOP<br />
}}<!--<br />
-->{{ParameterItem|itemLabel=Channel Name<br />
|itemName=name<br />
|parName=match<br />
|itemSummary=Match channel inputs by name, regardless of their order.<br />
|opFamily=CHOP<br />
}} <br />
<br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
<br />
}} <br />
{{:CHOP Filter Common Page <br />
}} <br />
{{InputsPage<br />
|opFamily=CHOP<br />
|opInputs={{OPInput<br />
|opFamily=CHOP<br />
|inputIndex=0<br />
|inputName=<br />
|inputSummary=<br />
}}<br />
}}<br />
{{InfoCHOPChannels<br />
|opFamily=CHOP<br />
|opLabel=Interpolate<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{CHOPNavBox <br />
|opFamily=CHOP <br />
}} <br />
{{#invoke:Category <br />
|list|CHOPs}}</div>Robhttps://docs.derivative.ca/index.php?title=Examine_DAT&diff=27315Examine DAT2022-07-22T15:27:04Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opFamily=DAT <br />
|opLicense=Non-Commercial <br />
|opLabel=Examine <br />
|long=The Examine DAT lets you inspect an operator's python storage, locals, globals, expressions, and extensions. <br />
|opType=examine <br />
|opClass=examineDAT_Class <br />
|opFilter=False <br />
|short=The Examine DAT lets you inspect an operator's python storage, locals, globals, expressions, and extensions. <br />
|opCategories= <br />
}} <br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opFamily=DAT <br />
|parName=op <br />
|parLabel=Operator <br />
|parOrder=0 <br />
|opType=examine <br />
|parSummary=Path to the operator to examine. <br />
|parType=OP<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=source <br />
|parOrder=1 <br />
|parLabel=Source <br />
|opType=examine <br />
|parItems= <br />
{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Operator Storage<br />
|itemSummary=Examine the operator's [[Storage|storage]].<br />
|itemName=storage<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Operator Locals<br />
|itemSummary=Examine the local dictionary associated with the operator's module. (DATs only).<br />
|itemName=locals<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Extensions<br />
|itemSummary=Examine any [[Extensions|extension]] objects defined in the Component. <br />
|itemName=extensions<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Globals<br />
|itemSummary=Examine the global dictionary associated with the project (accessible via the textport).<br />
|itemName=globals<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Expression<br />
|itemSummary=Specify the object to be examined.<br />
|itemName=expression<br />
}} <br />
<br />
|parSummary=Specifies what part of the operator to examine. <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=subkey <br />
|parLabel=Subkey <br />
|parOrder=2 <br />
|opType=examine <br />
|parSummary=If the object to be examined is a dictionary you can specify which element to examine here. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=expression <br />
|parLabel=Expression <br />
|parOrder=3 <br />
|opType=examine <br />
|parSummary=When source is set to Expression, enter your expression in this parameter. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=level <br />
|parLabel=Level <br />
|parOrder=4 <br />
|opType=examine <br />
|parSummary=Clamp the maximum depth level. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=key <br />
|parLabel=Key <br />
|parOrder=5 <br />
|opType=examine <br />
|parSummary=Filter Key results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=type <br />
|parLabel=Type <br />
|parOrder=6 <br />
|opType=examine <br />
|parSummary=Filter Type results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=value <br />
|parLabel=Value <br />
|parOrder=7 <br />
|opType=examine <br />
|parSummary=Filter Value results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=expandclasses <br />
|parLabel=Expand Classes <br />
|parOrder=8 <br />
|opType=examine <br />
|parSummary=When true, complex object structures (example OP) are further expanded. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=maxlevels <br />
|parLabel=Max Levels <br />
|parOrder=9 <br />
|opType=examine <br />
|parSummary=Specify the maximum depth in which to expand a python object.<br />
|parType=Int<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=format <br />
|parOrder=10 <br />
|parLabel=Format <br />
|opType=examine <br />
|parItems= <br />
{{ParameterItem|opFamily=DAT<br />
|parName=format<br />
|itemLabel=Text<br />
|itemSummary=<br />
|itemName=text<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=format<br />
|itemLabel=Table<br />
|itemSummary=<br />
|itemName=table<br />
}} <br />
<br />
|parSummary=Determines whether the output is raw text or in table format. <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputheaders <br />
|parLabel=Output Headers <br />
|parOrder=11 <br />
|opType=examine <br />
|parSummary=Turn this on to display the column names when '''Format''' is set to Table. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputlevel <br />
|parLabel=Output Level <br />
|parOrder=12 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Level''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputkey <br />
|parLabel=Output Key <br />
|parOrder=13 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Key''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputtype <br />
|parLabel=Output Type <br />
|parOrder=14 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Type''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputvalue <br />
|parLabel=Output Value <br />
|parOrder=15 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Value''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
<br />
|opFamily=DAT <br />
|pageName=Examine <br />
|pageSummary= <br />
}} <br />
{{:DAT Generator Common Page <br />
}} <br />
<br />
{{InfoCHOPChannels<br />
|opFamily=DAT<br />
|opLabel=Examine<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{DATNavBox <br />
|opFamily=DAT <br />
}} <br />
{{#invoke:Category <br />
|list|DATs}}</div>Robhttps://docs.derivative.ca/index.php?title=Examine_DAT&diff=27314Examine DAT2022-07-22T15:26:13Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opFamily=DAT <br />
|opLicense=Non-Commercial <br />
|opLabel=Examine <br />
|long=The Examine DAT lets you inspect an operator's python storage, locals, globals, expressions, and extensions. <br />
|opType=examine <br />
|opClass=examineDAT_Class <br />
|opFilter=False <br />
|short=The Examine DAT lets you inspect an operator's python storage, locals, globals, expressions, and extensions. <br />
|opCategories= <br />
}} <br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opFamily=DAT <br />
|parName=op <br />
|parLabel=Operator <br />
|parOrder=0 <br />
|opType=examine <br />
|parSummary=Path to the operator to examine. <br />
|parType=OP<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=source <br />
|parOrder=1 <br />
|parLabel=Source <br />
|opType=examine <br />
|parItems= <br />
{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Operator Storage<br />
|itemSummary=Examine the operator's [[Storage|storage]].<br />
|itemName=storage<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Operator Locals<br />
|itemSummary=Examine the local dictionary associated with the operator's module. (DATs only).<br />
|itemName=locals<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Extensions<br />
|itemSummary=Examine any [[Extensions|extension]] objects defined in the Component. <br />
|itemName=extensions<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Globals<br />
|itemSummary=Examine the global dictionary associated with the project (accessible via the textport).<br />
|itemName=globals<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Expression<br />
|itemSummary=Specify the object to be examined.<br />
|itemName=expression<br />
}} <br />
<br />
|parSummary=Specifies what part of the operator to examine. <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=subkey <br />
|parLabel=Subkey <br />
|parOrder=2 <br />
|opType=examine <br />
|parSummary=If the object to be examined is a dictionary you can specify which element to examine here. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=expression <br />
|parLabel=Expression <br />
|parOrder=3 <br />
|opType=examine <br />
|parSummary=When source is set to Expression, enter your expression in this parameter. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=level <br />
|parLabel=Level <br />
|parOrder=4 <br />
|opType=examine <br />
|parSummary=Clamp the maximum depth level. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=key <br />
|parLabel=Key <br />
|parOrder=5 <br />
|opType=examine <br />
|parSummary=Filter Key results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=type <br />
|parLabel=Type <br />
|parOrder=6 <br />
|opType=examine <br />
|parSummary=Filter Type results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=value <br />
|parLabel=Value <br />
|parOrder=7 <br />
|opType=examine <br />
|parSummary=Filter Value results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=expandclasses <br />
|parLabel=Expand Classes <br />
|parOrder=8 <br />
|opType=examine <br />
|parSummary=When true, complex object structures (example OP) are further expanded. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=maxlevels <br />
|parLabel=Max Levels <br />
|parOrder=9 <br />
|opType=examine <br />
|parSummary=Specify the maximum depth to expand a python object.<br />
|parType=Int<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=format <br />
|parOrder=10 <br />
|parLabel=Format <br />
|opType=examine <br />
|parItems= <br />
{{ParameterItem|opFamily=DAT<br />
|parName=format<br />
|itemLabel=Text<br />
|itemSummary=<br />
|itemName=text<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=format<br />
|itemLabel=Table<br />
|itemSummary=<br />
|itemName=table<br />
}} <br />
<br />
|parSummary=Determines whether the output is raw text or in table format. <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputheaders <br />
|parLabel=Output Headers <br />
|parOrder=11 <br />
|opType=examine <br />
|parSummary=Turn this on to display the column names when '''Format''' is set to Table. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputlevel <br />
|parLabel=Output Level <br />
|parOrder=12 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Level''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputkey <br />
|parLabel=Output Key <br />
|parOrder=13 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Key''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputtype <br />
|parLabel=Output Type <br />
|parOrder=14 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Type''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputvalue <br />
|parLabel=Output Value <br />
|parOrder=15 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Value''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
<br />
|opFamily=DAT <br />
|pageName=Examine <br />
|pageSummary= <br />
}} <br />
{{:DAT Generator Common Page <br />
}} <br />
<br />
{{InfoCHOPChannels<br />
|opFamily=DAT<br />
|opLabel=Examine<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{DATNavBox <br />
|opFamily=DAT <br />
}} <br />
{{#invoke:Category <br />
|list|DATs}}</div>Robhttps://docs.derivative.ca/index.php?title=Licenses_Class&diff=27313Licenses Class2022-07-21T21:36:47Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=Licenses|summary=The Licenses class describes the set of all installed [[License Class|license objects]]. It can be accessed with the licenses object, , found in the automatically imported [[td Module|td module]].<br />
<syntaxhighlight lang=python><br />
print(len(licenses)) # number of licenses <br />
print(licenses[0]) # first license in the list<br />
for l in licenses:<br />
print(l.type) # print all installed licenses' types<br />
</syntaxhighlight><br />
}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
<br />
{{ClassMember<br />
|class=Licenses<br />
|name=disablePro<br />
|type=bool<br />
|set=1<br />
|text=When True, the application will run as though no Pro licenses are available. This can be used to test compatibility with lesser licenses. (See also: [[App Class#Methods|app.addNonCommercialLimit]])<br />
}}<br />
{{ClassMember<br />
|class=Licenses<br />
|name=dongles<br />
|type=list<br />
|set=0<br />
|text=Get the list of dongles connected to the system.<br />
}}<br />
{{ClassMember<br />
|class=Licenses<br />
|name=machine<br />
|type=str<br />
|set=0<br />
|text=The computer machine name.<br />
}}<br />
{{ClassMember<br />
|class=Licenses<br />
|name=systemCode<br />
|type=str<br />
|set=0<br />
|text=The unique computer system code.<br />
}}<br />
{{ClassMember<br />
|class=Licenses<br />
|name=type<br />
|type=str<br />
|set=0<br />
|text=The highest ranking license type of all installed licenses, some products being 'Pro', 'Non-Commercial', 'Commercial'. See also app.product in [[App Class]].}}}}<br />
{{ClassMethodSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
<br />
{{ClassMethod<br />
|class=Licenses<br />
|name=install<br />
|call=install(key)<br />
|returns=bool<br />
|text=Install a [[License Class|license]] with the specified key. Returns True if successful.}}}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=App_Class&diff=27312App Class2022-07-21T21:35:04Z<p>Rob: </p>
<hr />
<div>{{TDClassSummary|label=App|summary=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|td module]].<br />
<br />
'''NOTE:''' See also [[Variables]] and Dialogs -> Variables where more built-in paths and strings are available via expressions in the form <code>var('DESKTOP')</code>, <code>var('MYDOCUMENTS')</code> and <code>var('TOENAME')</code>.}}<br />
<section begin=HELPBODY /><br />
{{ClassMemberSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMember<br />
|class=App<br />
|name=architecture<br />
|type=str<br />
|set=0<br />
|text=The architecture of the compile. Generally 32 or 64 bit.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=binFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing the binaries.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=build<br />
|type=str<br />
|set=0<br />
|text=Application build number.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=compileDate<br />
|type=tuple(year, month, day)<br />
|set=0<br />
|text=The date the application was compiled, expressed as a tuple (year, month, day).<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=configFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing configuration files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=desktopFolder<br />
|type=str<br />
|set=0<br />
|text=Current user's desktop folder.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=enableOptimizedExprs<br />
|type=bool<br />
|set=1<br />
|text=Get or set if Python expression optimization is enabled. Defaults to True every time TouchDesigner starts.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=installFolder<br />
|type=str<br />
|set=0<br />
|text=Main installation folder.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=launchTime<br />
|type=float<br />
|set=0<br />
|text=Total time required to launch and begin playing the toe file, measured in seconds.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=logExtensionCompiles<br />
|type=bool<br />
|set=1<br />
|text=Get or set if extra messages for starting and ending compiling extensions is sent to the textport. Additional error stack will be printed if compilation fails. Defaults to False every time TouchDesigner starts.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=osName<br />
|type=str<br />
|set=0<br />
|text=The operating system name.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=osVersion<br />
|type=str<br />
|set=0<br />
|text=The operating system version.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=power<br />
|type=bool<br />
|set=1<br />
|text=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.<br />
<syntaxhighlight lang=python><br />
app.power = False #turn off the power button.<br />
</syntaxhighlight><br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=preferencesFolder<br />
|type=str<br />
|set=0<br />
|text=Folder where the preferences file is located.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=product<br />
|type=str<br />
|set=0<br />
|text=Application name. For example, 'TouchDesigner', 'TouchPlayer'. See also licences.type in [[Licenses Class]].}}<br />
{{ClassMember<br />
|class=App<br />
|name=recentFiles<br />
|type=list<br />
|set=1<br />
|text=Get or set the list of most recently saved or loaded files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=samplesFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing configuration files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=paletteFolder<br />
|type=str<br />
|set=0<br />
|text=Installation folder containing palette files.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=userPaletteFolder<br />
|type=str<br />
|set=0<br />
|text=Folder where custom user palettes are located.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=version<br />
|type=str<br />
|set=0<br />
|text=Application version number.<br />
}}<br />
{{ClassMember<br />
|class=App<br />
|name=windowColorBits<br />
|type=int<br />
|set=0<br />
|text=The number of color bits per color channel the TouchDesigner window is running at. By default this will be 8-bits per channel, but can be increased to 10-bits by settings env var TOUCH_10_BIT_COLOR=1. Only works on displays that support 10-bit color.<br />
}}}}<br />
{{ClassMethodSection|empty=<br />
|Sectionsummary=<br />
|items=<br />
{{ClassMethod<br />
|class=App<br />
|name=addNonCommercialLimit<br />
|call=addNonCommercialLimit(password)<br />
|returns=None<br />
|text=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. (See also [[Licenses Class|licenses.disablePro]]) member.<br />
*password - (Keyword, Optional) Password to later remove the restriction.<br />
<syntaxhighlight lang=python><br />
app.addNonCommercialLimit('secret123') #undoable with password<br />
app.addNonCommercialLimit() #permanent during length of session.<br />
</syntaxhighlight><br />
}} <br />
{{ClassMethod<br />
|class=App<br />
|name=removeNonCommercialLimit<br />
|call=removeNonCommercialLimit(password)<br />
|returns=bool<br />
|text=Removes the restriction previously added. Returns True if successful.<br />
*password - (Keyword) Password previously used when restriction added.<br />
<syntaxhighlight lang=python><br />
app.removeNonCommercialLimit('secret123')<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=App<br />
|name=addResolutionLimit<br />
|call=addResolutionLimit(x,y password)<br />
|returns=None<br />
|text=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.<br />
*x - Width of maximum texture resolution, measured in pixels.<br />
*y - Height of maximum texture resolution, measured in pixels.<br />
*password - (Keyword, Optional) Password to later remove the restriction.<br />
<syntaxhighlight lang=python><br />
app.addResolutionLimit(600, 480, 'secret123') #undoable with password<br />
app.addResolutionLimit() #permanent during length of session.<br />
</syntaxhighlight><br />
}}<br />
{{ClassMethod<br />
|class=App<br />
|name=removeResolutionLimit<br />
|call=removeResolutionLimit(password)<br />
|returns=bool<br />
|text=Removes the restriction previously added. Returns True if successful.<br />
*password - (Keyword) Password previously used when restriction added.<br />
<syntaxhighlight lang=python><br />
app.removeResolutionLimit('secret123')<br />
</syntaxhighlight><br />
}}}}<br />
<section end=HELPBODY /><br />
{{History}}<br />
{{#invoke:Category|list|Python Reference}}</div>Robhttps://docs.derivative.ca/index.php?title=Examine_DAT&diff=27289Examine DAT2022-07-19T20:54:37Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opFamily=DAT <br />
|opLicense=Non-Commercial <br />
|opLabel=Examine <br />
|long=The Examine DAT lets you inspect an operator's python storage, locals, globals, expressions, and extensions. <br />
|opType=examine <br />
|opClass=examineDAT_Class <br />
|opFilter=False <br />
|short=The Examine DAT lets you inspect an operator's python storage, locals, globals, expressions, and extensions. <br />
|opCategories= <br />
}} <br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opFamily=DAT <br />
|parName=op <br />
|parLabel=Operator <br />
|parOrder=0 <br />
|opType=examine <br />
|parSummary=Path to the operator to examine. <br />
|parType=OP<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=source <br />
|parOrder=1 <br />
|parLabel=Source <br />
|opType=examine <br />
|parItems= <br />
{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Operator Storage<br />
|itemSummary=Examine the operator's [[Storage|storage]].<br />
|itemName=storage<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Operator Locals<br />
|itemSummary=Examine the local dictionary associated with the operator's module. (DATs only).<br />
|itemName=locals<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Extensions<br />
|itemSummary=Examine any [[Extensions|extension]] objects defined in the Component. <br />
|itemName=extensions<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Globals<br />
|itemSummary=Examine the global dictionary associated with the project (accessible via the textport).<br />
|itemName=globals<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Expression<br />
|itemSummary=Specify the object to be examined.<br />
|itemName=expression<br />
}} <br />
<br />
|parSummary=Specifies what part of the operator to examine. <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=subkey <br />
|parLabel=Subkey <br />
|parOrder=2 <br />
|opType=examine <br />
|parSummary= <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=expression <br />
|parLabel=Expression <br />
|parOrder=3 <br />
|opType=examine <br />
|parSummary=When source is set to Expression, enter your expression in this parameter. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=level <br />
|parLabel=Level <br />
|parOrder=4 <br />
|opType=examine <br />
|parSummary=Filter Level results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=key <br />
|parLabel=Key <br />
|parOrder=5 <br />
|opType=examine <br />
|parSummary=Filter Key results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=type <br />
|parLabel=Type <br />
|parOrder=6 <br />
|opType=examine <br />
|parSummary=Filter Type results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=value <br />
|parLabel=Value <br />
|parOrder=7 <br />
|opType=examine <br />
|parSummary=Filter Value results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=expandclasses <br />
|parLabel=Expand Classes <br />
|parOrder=8 <br />
|opType=examine <br />
|parSummary= <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=maxlevels <br />
|parLabel=Max Levels <br />
|parOrder=9 <br />
|opType=examine <br />
|parSummary= <br />
|parType=Int<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=format <br />
|parOrder=10 <br />
|parLabel=Format <br />
|opType=examine <br />
|parItems= <br />
{{ParameterItem|opFamily=DAT<br />
|parName=format<br />
|itemLabel=Text<br />
|itemSummary=<br />
|itemName=text<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=format<br />
|itemLabel=Table<br />
|itemSummary=<br />
|itemName=table<br />
}} <br />
<br />
|parSummary=Determines whether the output is raw text or in table format. <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputheaders <br />
|parLabel=Output Headers <br />
|parOrder=11 <br />
|opType=examine <br />
|parSummary=Turn this on to display the column names when '''Format''' is set to Table. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputlevel <br />
|parLabel=Output Level <br />
|parOrder=12 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Level''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputkey <br />
|parLabel=Output Key <br />
|parOrder=13 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Key''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputtype <br />
|parLabel=Output Type <br />
|parOrder=14 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Type''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputvalue <br />
|parLabel=Output Value <br />
|parOrder=15 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Value''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
<br />
|opFamily=DAT <br />
|pageName=Examine <br />
|pageSummary= <br />
}} <br />
{{:DAT Generator Common Page <br />
}} <br />
<br />
{{InfoCHOPChannels<br />
|opFamily=DAT<br />
|opLabel=Examine<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{DATNavBox <br />
|opFamily=DAT <br />
}} <br />
{{#invoke:Category <br />
|list|DATs}}</div>Robhttps://docs.derivative.ca/index.php?title=Examine_DAT&diff=27288Examine DAT2022-07-19T20:52:53Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opFamily=DAT <br />
|opLicense=Non-Commercial <br />
|opLabel=Examine <br />
|long=The Examine DAT lets you inspect an operator's python storage, locals, globals, expressions, and extensions. <br />
|opType=examine <br />
|opClass=examineDAT_Class <br />
|opFilter=False <br />
|short=The Examine DAT lets you inspect an operator's python storage, locals, globals, expressions, and extensions. <br />
|opCategories= <br />
}} <br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opFamily=DAT <br />
|parName=op <br />
|parLabel=Operator <br />
|parOrder=0 <br />
|opType=examine <br />
|parSummary=Path to the operator to examine. <br />
|parType=OP<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=source <br />
|parOrder=1 <br />
|parLabel=Source <br />
|opType=examine <br />
|parItems= <br />
{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Operator Storage<br />
|itemSummary=Examine the operator's [[Storage|storage]].<br />
|itemName=storage<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Operator Locals<br />
|itemSummary=Examine the local dictionary associated with the operator's module. (DATs only).<br />
|itemName=locals<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Extensions<br />
|itemSummary=Examine any [[Extensions|extension] objects defined in the Component. <br />
|itemName=extensions<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Globals<br />
|itemSummary=Examine the global dictionary associated with the project (accessible via the textport).<br />
|itemName=globals<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Expression<br />
|itemSummary=Specify the object to be examined.<br />
|itemName=expression<br />
}} <br />
<br />
|parSummary=Specifies what part of the operator to examine. <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=subkey <br />
|parLabel=Subkey <br />
|parOrder=2 <br />
|opType=examine <br />
|parSummary= <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=expression <br />
|parLabel=Expression <br />
|parOrder=3 <br />
|opType=examine <br />
|parSummary=When source is set to Expression, enter your expression in this parameter. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=level <br />
|parLabel=Level <br />
|parOrder=4 <br />
|opType=examine <br />
|parSummary=Filter Level results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=key <br />
|parLabel=Key <br />
|parOrder=5 <br />
|opType=examine <br />
|parSummary=Filter Key results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=type <br />
|parLabel=Type <br />
|parOrder=6 <br />
|opType=examine <br />
|parSummary=Filter Type results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=value <br />
|parLabel=Value <br />
|parOrder=7 <br />
|opType=examine <br />
|parSummary=Filter Value results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=expandclasses <br />
|parLabel=Expand Classes <br />
|parOrder=8 <br />
|opType=examine <br />
|parSummary= <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=maxlevels <br />
|parLabel=Max Levels <br />
|parOrder=9 <br />
|opType=examine <br />
|parSummary= <br />
|parType=Int<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=format <br />
|parOrder=10 <br />
|parLabel=Format <br />
|opType=examine <br />
|parItems= <br />
{{ParameterItem|opFamily=DAT<br />
|parName=format<br />
|itemLabel=Text<br />
|itemSummary=<br />
|itemName=text<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=format<br />
|itemLabel=Table<br />
|itemSummary=<br />
|itemName=table<br />
}} <br />
<br />
|parSummary=Determines whether the output is raw text or in table format. <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputheaders <br />
|parLabel=Output Headers <br />
|parOrder=11 <br />
|opType=examine <br />
|parSummary=Turn this on to display the column names when '''Format''' is set to Table. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputlevel <br />
|parLabel=Output Level <br />
|parOrder=12 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Level''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputkey <br />
|parLabel=Output Key <br />
|parOrder=13 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Key''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputtype <br />
|parLabel=Output Type <br />
|parOrder=14 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Type''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputvalue <br />
|parLabel=Output Value <br />
|parOrder=15 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Value''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
<br />
|opFamily=DAT <br />
|pageName=Examine <br />
|pageSummary= <br />
}} <br />
{{:DAT Generator Common Page <br />
}} <br />
<br />
{{InfoCHOPChannels<br />
|opFamily=DAT<br />
|opLabel=Examine<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{DATNavBox <br />
|opFamily=DAT <br />
}} <br />
{{#invoke:Category <br />
|list|DATs}}</div>Robhttps://docs.derivative.ca/index.php?title=Examine_DAT&diff=27287Examine DAT2022-07-19T20:52:28Z<p>Rob: </p>
<hr />
<div>{{Summary <br />
|opFamily=DAT <br />
|opLicense=Non-Commercial <br />
|opLabel=Examine <br />
|long=The Examine DAT lets you inspect an operator's python storage, locals, globals, expressions, and extensions. <br />
|opType=examine <br />
|opClass=examineDAT_Class <br />
|opFilter=False <br />
|short=The Examine DAT lets you inspect an operator's python storage, locals, globals, expressions, and extensions. <br />
|opCategories= <br />
}} <br />
{{ParameterPage <br />
|items= <br />
{{Parameter|opFamily=DAT <br />
|parName=op <br />
|parLabel=Operator <br />
|parOrder=0 <br />
|opType=examine <br />
|parSummary=Path to the operator to examine. <br />
|parType=OP<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=source <br />
|parOrder=1 <br />
|parLabel=Source <br />
|opType=examine <br />
|parItems= <br />
{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Node Storage<br />
|itemSummary=Examine the operator's [[Storage|storage]].<br />
|itemName=storage<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Operator Locals<br />
|itemSummary=Examine the local dictionary associated with the operator's module. (DATs only).<br />
|itemName=locals<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Extensions<br />
|itemSummary=Examine any [[Extensions|extension] objects defined in the Component. <br />
|itemName=extensions<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Globals<br />
|itemSummary=Examine the global dictionary associated with the project (accessible via the textport).<br />
|itemName=globals<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=source<br />
|itemLabel=Expression<br />
|itemSummary=Specify the object to be examined.<br />
|itemName=expression<br />
}} <br />
<br />
|parSummary=Specifies what part of the node to examine. <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=subkey <br />
|parLabel=Subkey <br />
|parOrder=2 <br />
|opType=examine <br />
|parSummary= <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=expression <br />
|parLabel=Expression <br />
|parOrder=3 <br />
|opType=examine <br />
|parSummary=When source is set to Expression, enter your expression in this parameter. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=level <br />
|parLabel=Level <br />
|parOrder=4 <br />
|opType=examine <br />
|parSummary=Filter Level results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=key <br />
|parLabel=Key <br />
|parOrder=5 <br />
|opType=examine <br />
|parSummary=Filter Key results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=type <br />
|parLabel=Type <br />
|parOrder=6 <br />
|opType=examine <br />
|parSummary=Filter Type results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=value <br />
|parLabel=Value <br />
|parOrder=7 <br />
|opType=examine <br />
|parSummary=Filter Value results. <br />
|parType=Str<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=expandclasses <br />
|parLabel=Expand Classes <br />
|parOrder=8 <br />
|opType=examine <br />
|parSummary= <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=maxlevels <br />
|parLabel=Max Levels <br />
|parOrder=9 <br />
|opType=examine <br />
|parSummary= <br />
|parType=Int<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=format <br />
|parOrder=10 <br />
|parLabel=Format <br />
|opType=examine <br />
|parItems= <br />
{{ParameterItem|opFamily=DAT<br />
|parName=format<br />
|itemLabel=Text<br />
|itemSummary=<br />
|itemName=text<br />
}}<!--<br />
-->{{ParameterItem|opFamily=DAT<br />
|parName=format<br />
|itemLabel=Table<br />
|itemSummary=<br />
|itemName=table<br />
}} <br />
<br />
|parSummary=Determines whether the output is raw text or in table format. <br />
|parType=Menu<br />
|parReadOnly= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputheaders <br />
|parLabel=Output Headers <br />
|parOrder=11 <br />
|opType=examine <br />
|parSummary=Turn this on to display the column names when '''Format''' is set to Table. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputlevel <br />
|parLabel=Output Level <br />
|parOrder=12 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Level''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputkey <br />
|parLabel=Output Key <br />
|parOrder=13 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Key''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputtype <br />
|parLabel=Output Type <br />
|parOrder=14 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Type''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
{{Parameter|opFamily=DAT <br />
|parName=outputvalue <br />
|parLabel=Output Value <br />
|parOrder=15 <br />
|opType=examine <br />
|parSummary=Turn this on to output the '''Value''' column of the results. <br />
|parType=Toggle<br />
|parReadOnly= <br />
|parItems= <br />
}} <br />
<br />
|opFamily=DAT <br />
|pageName=Examine <br />
|pageSummary= <br />
}} <br />
{{:DAT Generator Common Page <br />
}} <br />
<br />
{{InfoCHOPChannels<br />
|opFamily=DAT<br />
|opLabel=Examine<br />
|infoChannels=}}<br />
{{History <br />
}} <br />
{{DATNavBox <br />
|opFamily=DAT <br />
}} <br />
{{#invoke:Category <br />
|list|DATs}}</div>Rob