Window COMP

From TouchDesigner 088 Wiki


The Window Component allows you to create and maintain a separate floating window displaying the contents of any Panel or any other Node Viewer. You create a Window component, then point it to a panel or other Operator. You turn on the Open parameter of the Window component and adjust its settings, such as resolution, centering, and which monitor it gets displayed on. You see exactly what you would see in the Node Viewer.

Windows can be fit to a single monitor, span several monitors, or several Window components can occupy one monitor.

Press Esc over a selected window to make it close.

The Window component also is used for Perform Mode, where it is most often called /perform, the default window for Perform Mode. See also Window.

Attach an Info CHOP to the Window component - it will show you the window's current location and size, and whether the window is actually open.

PythonIcon.png windowCOMP Class

Parameters - Window Page

Operator winop - Specifies the operator the window will display.

Allow Panel Interaction interact - Enables interactions with scoped Operator.

Title title - Specify the window's title.

Location location - All the positioning parameters below are done relative to the 'location' that you define here. Your window can span more than the specified 'area', it's just used as the reference for positioning.

  • Main Monitor mainmonitor - The primary monitor which is sometimes referred to as the main display in Windows control panel or the primary display in the NVIDIA control panel. The Windows TaskBar is accounted for with this option, so position and sizing will not cover it up by default.
  • Single Monitor smonitor - Defines the location to be the monitor specified in the Monitor parameter below. The TaskBar is ignored when using this option.
  • All Monitors allmonitors - Defines the location to include all monitors. The TaskBar is ignored when using this option.

Monitor monitor - Specify the monitor index when Area is set to Single Monitor.

Ignore Taskbar ignoretaskbar - Determines whether the taskbar in considered in the window's positioning.

Size size - Determines how the size of the window is specified by the Width, Height parameters below.

  • Automatic from COMP/TOP automatic - Determines the size automatically from the COMP/TOP specified.
  • Fill Location fill - Fills the location specified in the Location parameter above.
  • Custom custom - Use the Width and Height parameters below to specify a customer size.

Width winw - The default width of the window when not specified.

Height winh - The default height of the window when not specified.

Justify Horizontal justifyh

  • Left left - Align window so that left edge coincides with left edge of specified area.
  • Center center - Align window so that horizontal center coincides with horizontal center of specified area.
  • Right right - Align window so that right edge coincides with right edge of specified area.
  • Mouse mouse - Align window so it opens horizontally centered on the mouse cursor.

Justify Vertical justifyv -

  • Top top - Align window so that top edge coincides with top edge of specified area.
  • Center center - Align window so that vertical center coincides with vertical center of specified area.
  • Bottom bottom - Align window so that bottom edge coincides with bottom edge of specified area.
  • Mouse mouse - Align window so it opens vertically centered on the mouse cursor.

Offset X winoffsetx - Horizontal offset applied to window after justifying.

Offset Y winoffsety - Vertical offset applied to window after justifying.

Keep Window Aspect keepaspect

  • Never never - The window may be resized to any aspect ratio.
  • Always always - The window aspect ratio is always maintained while resizing.
  • Use Operator Settings useoperator - The referenced Operator controls whether or not the aspect ratio is maintained.

Borders borders - Controls whether or not the window contains borders and a title bar.

Always on Top alwaysontop - Controls whether or not the window always sits atop other floating windows.

Cursor Visible cursorvisible - Controls whether or not the cursor remains visible when over this window.

Close on Escape Key closeescape - When selected, pressing the escape key over this window will close it.

Hardware Frame-Lock hwframelock - provides multi-GPU frame sync using Nvidia Gsync and AMD S400 sync cards.

V-Sync Mode vsyncmode - Controls how the window is updated with regards to V-Sync. Enabled means it will update in sync with the monitors refresh which avoids tearing and lost frames. Disabled means it can update at any point during the refresh which can result in tearing or lost frames. FPS is Half Monitor Rate should be used when doing things such as running a 30fps file on a 60Hz display. This makes each update be shown for exactly 2 refreshes which keeps motion looking smooth.

Draw Window drawwindow - When disabled the window will not update it's contents at all. Useful for processes that arn't doing rendering such as Audio or networking processes, or for when using VR devices.

Open As Perform Window Once performonce - The window specified as the Perform Window is set using the 'Window Placement' dialog. This button allows opening the Window COMP as the Perform Window without changing what is currently selected as the 'real' Perform Window.

Open in Separate Window winopen - Opens this Window COMP as it's own window, not as the Perform Window. Useful for things such as dialog boxes or popups, but should not be used for putting final rendered content to outputs. Use a single large Perform Window for that instead of individual windows per-monitor.

Close winclose - Closes the window, if it's open.

Set as Perform Window (F1) setperform - Permanently changes the selection in the Window Placement dialog for the Perform Window to this window.

Window Placement Dialog opendialog - A shortcut to open the Window Placement dialog.

Parameters - Common Page

The Common parameter page sets the component's node viewer, clone relationships, Parent Shortcut, and Global OP Shortcut.

Parent Shortcut parentshortcut - Specifies a name you can use anywhere inside the component as the path to that component. See Parent Shortcut.

Global OP Shortcut opshortcut - Specifies a name you can use anywhere at all as the path to that component. See Global OP Shortcut.

Node View - Determines what is displayed in the node viewer, also known as the Node Viewer. Some options will not be available depending on the Component type (Object Component, Panel Component, Misc.)

  • Geometry Viewer - Shows a 3D geometry viewer displaying the geometry inside the component. This option is only available for Object components.
  • Control Panel - Displays the Control Panel, only available for Panel Components.
  • Operator Viewer - Displays the node viewer from any operator specified in the Operator Viewer parameter below.

Operator Viewer opviewer - Select which operator's node viewer to use when the Node View parameter is set to Operator Viewer.

Enable Cloning enablecloning - Control if the OP should be actively cloned.

Clone Master clone - Path to a component used as the Master Clone. If the component specified as Master exists, then this component becomes a clone.

Load On Demand loadondemand - Loads the component into memory only when required. Good to use for components that are not always used in the project.

External .tox externaltox - Path to a .tox file on disk which will source the component's content upon start of a .toe. This allows for components to contain networks that can be updated independently of the .toe file. Paths used to locate .tox files should not contain expressions or root variables. Built-in and Environment variables (like $MYDOCUMENTS, $DESKTOP and $HOME) are accepted. If the .tox file can not be found, whatever the .toe file was saved with will be loaded.

Reload .tox on Start reloadtoxonstart - When on (default), the external .tox file will be loaded when the .toe starts and the contents of the COMP will match that of the external .tox. This can be turned off to avoid loading from the referenced external .tox on startup if desired (the contents of the COMP are instead loaded from the .toe file). Useful if you wish to have a COMP reference an external .tox but not always load from it unless you specifically push the Re-Init Network parameter button.

Save Backup of External savebackup - When this checkbox is enabled, a backup copy of the component specified by the External .tox parameter is saved in the .toe file. This backup copy will be used if the External .tox can not be found. This may happen if the .tox was renamed, deleted, or the .toe file is running on another computer that is missing component media.

Sub-Component to Load subcompname - When loading from an External .tox file, this option allows you to reach into the .tox and pull out a COMP and make that the top-level COMP, ignoring everything else in the file (except for the contents of that COMP). For example if a .tox file named project1.tox contains project1/geo1, putting geo1 as the Sub-Component to Load, will result in geo1 being loaded in place of the current COMP. If this parameter is blank, it just loads the .tox file normally using the top level COMP in the file.

Re-Init Network reinitnet - This button will re-load from the external .tox file (if present), followed by re-initializing itself from its master, if it's a clone.

See Also