paya.runtime.nodes.RemapValue#

class RemapValue(*args, **kwargs)#

Inheritance

RemapValue DependNode DependNode PyNode ProxyUnicode

setValues(positionValuePairs, interpolation='Linear')#

Sets (or connects) all values on this node. The entire previous configuration of the value compound multi is discarded.

Parameters
  • positions ([float, Math1D]) – the positions at which to set values

  • values ([float, Math1D]) – the values to set; must be the same number as positions

  • interpolation/i

    this can be either one enum key or index for the value interpolation, or a list of them. The enums are:

    • 0: ‘None’

    • 1: ‘Linear’ (the default)

    • 2: ‘Smooth’

    • 3: ‘Spline’

Returns

self

Return type

RemapValue

resetValues()#

Resets the value compound array.

Returns

self

Return type

RemapValue

sampleValue(position, reuse=True, plug=None)#

Samples an interpolated value at the specified position.

Parameters
  • position (float, Math1D) – the position at which to sample a value

  • reuse/re (bool) – look for an existing sample for the same position value or plug; defaults to True

  • plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to None

Returns

The value sample output.

Return type

Math1D

setColors(positionColorPairs, interpolation='Linear')#

Sets (or connects) all colors on this node. The entire previous configuration of the color compound multi is discarded.

Parameters
  • positions ([float, Math1D]) – the positions at which to set colors

  • colors ([list, tuple, str, Vector, Vector]) – the colors to set; must be the same number as positions

  • interpolation/i – this can be either one enum key or index for the color interpolation, or a list of them. The enums are: - 0: ‘None’ - 1: ‘Linear’ (the default) - 2: ‘Smooth’ - 3: ‘Spline’

Returns

self

Return type

RemapColor

resetColors()#

Resets the color compound array.

Returns

self

Return type

RemapValue

sampleColor(position, plug=None, reuse=True)#

Samples an interpolated color at the specified position.

Parameters
  • position (float, Math1D) – the position at which to sample a color

  • reuse/re (bool) – look for an existing sample for the same position value or plug; defaults to True

  • plug/p (bool) – force a dynamic output, or indicate that one or more of the arguments are plugs to skip checks; defaults to None

Returns

The color sample output.

Return type

Vector

resetNode(skipInputValue=False)#

Removes all inputs from this node and resets all attributes to defaults.

Parameters

skipInputValue/siv (bool) – don’t modify the inputValue attribute; defaults to False

Returns

self

Return type

RemapValue

driveSlave(slave, skipInputValue=False)#

Drives another remapValue node completely.

Parameters
  • slave (str, RemapValue) – the node to drive

  • skipInputValue/siv (bool) – don’t modify the slave inputValue attribute; defaults to False

Returns

self

Return type

RemapValue

createClone()#
Returns

A new remapValue node, driven by this one.

Return type

RemapValue

getClones()#
Returns

Nodes created using createClone().

Return type

[RemapValue]

findCloneWithPosition(position)#
Parameters

position (float, Math1D) – the position value or plug

Raises

NoCloneForPositionError – No clone was found.

Returns

An existing clone configured for the specified position.

Return type

RemapValue

updateClones()#

Reconnects current clones. This is normally necessary after adding or removing color or value indices on this node.

Returns

self

Return type

RemapValue