Slider COMP

From TouchDesigner 088 Wiki

Summary

The Slider Component lets you build sliders in X, Y and XY, and outputs 1 or 2 channels from a Panel CHOP placed in the Slider component.

See Panel Value.

PythonIcon.png sliderCOMP_Class

Parameters - Layout Page

The Layout parameter page controls the size, position, and alignment of the panel.

X x - Allows you to specify the Panel Component's horizontal position relative to its parent.

Y y - Allows you to specify the Panel Component's vertical position relative to its parent.

Width w - Allows you to specify the Panel Component's width.

Height h - Allows you to specify the Panel Component's height.

Use XY As Offset usexyasoffset - Uses the X and Y parameters as an offset after the parent alignment options have been applied to the panel.

Margin margin[lrbt] - The four fields allow you to specify the space that surrounds the Panel Component. The margin is the space between the Panel Component's border and the outer edge. The Margin is defined in absolute pixels and does not stretch with the window, as a result margin is not reflected in the node's panel viewer but only when the parent is drawn in a floating window.

Children Scale scale[xy] - Allows you to uniformly scale the Panel Component's children.

Children Offset offset[xy] - Allows you to offset the Panel Component's children. This parameter is overwritten by the Align, Justify Horizontal, and Justify Vertical parameters, see below.

Align align - This menu allows you to specify how the children inside the Panel Component will be laid out. The options Layout Grid Rows, Layout Grid Columns and Layout to Network Nodes will scale the Panel Component's children to fit the Component. They use the Align Order of each of the children's Panel Components.

Align Order order - This parameter allows you to specify the Panel Component's position when its parent's Align parameter is set to something other then None or Layout to Network Nodes. Lower numbers are first.

Align Margin alignmargin - This is enabled by choosing any Align option other than None or Layout to Network Nodes. It defines the space between the children of the Panel Component when they are being aligned.

Max per Line alignmax - This is enabled by choosing any Align option other than None, Layout Grid Horizontal, Layout Grid Vertical, or Layout to Network Nodes, and defines the maximum number of children placed in one row or column.

Ignore Alignment alignignore - When on the Panel Component, will ignore any Align parameter settings from its parent Panel Component.

  • Off - Aligns the panel based on settings in parent.
  • On - Does not align the panel but respects margins.
  • All - Does not align the panel and disregards margins.

Justify Horizontal justifyh - The menu attached to this parameter allows you to specify how the panel component's children are being justified horizontally.

Justify Vertical justifyv - The menu attached to this parameter allows you to specify how the panel component's children are being justified vertically.

Fit fit - The menu attached to this parameter allows you to specify how the panel component's children are being scaled into the panel's window. This parameter overrides the Justify Horizontal and Justify Vertical parameters.

Stretch Horizontal stretchh - When enabled this parameter will stretch the panel component to fit its parent's Width parameter.

Stretch Vertical stretchv - When enabled this parameter will stretch the panel component to fit its parent's Height parameter.

Layer layer - Allows you to specify the layer position of the panel component, with higher values meaning the panel component will be drawn over any other panel component in the same network with a lower value. Unexpected results may occur if two panel components in the same network have the same Layer value.

Crop Panel crop - The menu attached to this parameter lets you specify if any children panel components which are positioned partially or completely outside the panel component's dimensions get cropped.

Overlay overlay - Draws the panel last regardless of its position in the panel hierarchy.

Window and Viewer Fill fill - The menu attached to this parameter lets you specify how the control panel fills a floating window and its node viewer.

Stuff from Window stufffromwindow - When enabled the panel component's width and height are effected by resizing its floating window viewer.


Parameters - Panel Page

The Panel parameter page controls panel attributes such as display on/off, enable on/off, panel help, and background images.

Click Through panelclickthrough - When enabled all mouse clicks are ignored by this Panel Component.

Mouse UV Buttons uvbuttons[left,middle,right] - Allows you to specify which mouse buttons update the uv Panel Values.

Relative UV mouserel - When enabled the uv Panel Values will reflect relative mouse movement.

Use Mouse Wheel mousewheel - Turn on to capture events when the mouse wheel is used over the panel.

Cursor panelcursor - Changes the cursor displayed when cursor is over the panel.

Multi-Touch panelmultitouch - 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.

  • Use Parent's Multi-Touch Settings - Use the parent's Multi-Touch setting. This defaults to enabled in the root component.
  • Use Built-in Multi-Touch - Enable use of first touch as mouse.
  • Do Not Use Built-in Multi-Touch - Disable use of first touch as mouse.

Background TOP paneltop - Allows you to specify a TOP / Texture Operator which is used as background for the panel component.

TOP Fill paneltopfill - This menu specifies the way the Background TOP will fill the panel's background.

Override CHOP panelchop - Specifies the path to the CHOP that holds the channels to override the panel's Panel Values with.

Match by Name panelnamedchop - Match the channels by name from the CHOP specified in the Override CHOP parameter to the panel's Panel Values.

Override Method paneloverridemethod - Determines how the values in the Override CHOP are applied to the panel.

  • Trigger - A change in the CHOP Override channel's value will trigger the panel values to update.
  • Always - The panel values always match the CHOP Override channel's value.

Help DAT panelhelpdat - Lets you specify the path to a Text DAT whose content will be displayed as a rollover pop-up help for the control panel.

Display paneldisplay - Specifies if the panel is displayed or hidden.

Opacity panelopacity - Allows you to fade the panel in and out.

Enable panelenable - Allows you to prevent all interaction with this panel.

Resize panelresize - Four checkboxes allow you to resize a panel by grabbing the corresponding edge or corner: Resize Left, Right, Bottom, Top.

W Range panelresizewmin panleresizewmax -

H Range panelresizehmin panleresizehmax -

Reposition reposition - Enables repositioning of the panel or the panel's containing window. Reposition means you are able to move the panel component or window by dragging the mouse.

Component repocomp - Enabled by choosing the Local option from the Reposition parameter. Specify the path to the panel component you would like to reposition by mouse.

X Range repositionx[min,max] - Enabled by choosing the Local option from the Reposition parameter. Specify the maximum range you want to be able to reposition the panel component horizontally.

Y Range repositiony[min,max] - Enabled by choosing the Local option from the Reposition parameter. Specify the maximum range you want to be able to reposition the panel component vertically.

Keep in Memory on Close keepmemory - Speeds up the opening of the panel when opened a second time and thereafter. It will keep the UI objects needed to render and layout the panel in memory.


Parameters - Slider Page

Slider Type /slidertype - sets the type of slider.

  • - Slider U - a horizontal slider that tracks movement only in the u Panel Value.
  • - Slider V - a vertical slider that tracks movement only in the v Panel Value.
  • - Slider UV - a slider that tracks movement in both u and v Panel Values.

Zone Left /zonel - sets the left bounding area that the slider will track movement in. 0 is the left edge of the panel, 1 is the right edge of the panel. Values outside the 0-1 range can be used.

Zone Right /zoner - sets the right bounding area that the slider will track movement in.

Zone Bottom /zoneb - sets the bottom bounding area that the slider will track movement in.

Zone Top /zonet - sets the top bounding area that the slider will track movement in.

Clamp U Low /clampul - clamps the minimum output of the panel value u to 0.

Clamp U High /clampuh - clamps the maximum output of the panel value u to 0.

Clamp V Low /clampvl - clamps the minimum output of the panel value v to 0.

Clamp V High /clampvh - lamps the maximum output of the panel value v to 0.

Parameters - Color Page

The Color parameter page sets the panel's background, border, and disabled colors.

Background Color bgcolor[rgb] bgalpha - RGBA values for the background. (default: black (0,0,0,0))

Border A bordera[rgb] borderaalpha - RGBA values for border A color.

Border B borderb[rgb] borderbalpha - RGBA values for border B color.

Left leftborder leftborderi - What color the 2 left-most pixels are. Options are 0 (no change), Border A (uses color defined in Border A), or Border B (uses color defined in Border B).

Right rightborder rightborderi - What color the 2 right-most pixels are. Options are 0 (no change), Border A (uses color defined in Border A), or Border B (uses color defined in Border B).

Top topborder topborderi - What color the 2 top-most pixels are. Options are 0 (no change), Border A (uses color defined in Border A), or Border B (uses color defined in Border B).

Bottom bottomborder bottomborderi - What color the 2 bottom-most pixels are. Options are 0 (no change), Border A (uses color defined in Border A), or Border B (uses color defined in Border B).

Multiply RGB by Alpha multrgbbyalpha - Multiplies the RGB channels by the alpha channel.

Border on Top panelborderontop - Draws the panel's borders on top of all siblings panels.

Composite panelcomposite - Selects how the panel is composited with its siblings panels. See the Composite TOP for a description of the various composite methods.


Parameters - Drag Page

The Drag parameter page controls the panel's drag and drop behavior.

See also Drag-and-Drop


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.