Package autodesk_toxik :: Module graph :: Class SingleInput
[frames] | no frames]

Class SingleInput

 object --+            
          |            
Boost.Python.instance --+        
              |        
         Socket --+    
                  |    
              Input --+
                      |
                     SingleInput

Single-valued input. You can work on this input socket type to easily set up node networks that feed constant, animated or expression values.

Instance Methods
 
clearAnim(...)
Removes the animation curve and replaces it with the given constant value.
 
clearExpr(...)
Clears the expression string that generates values connected to this input socket.
type depends on the input socket type.
evaluate(...)
Evaluates the value of the input at the specified time (as a float in seconds) no matter what the connection state of the input is (constant, animated, expression or others).
tuple
getAnimCurve(...)
Returns: The complete animation curve on the input value.
type
getAnimValue(...)
Returns: The animated value (curve) that is connected to this input socket, at the specified time (as a float in seconds).
str
getExpr(...)
Returns: The expression string that generates values connected to this input socket.
str
getExprComment(...)
Returns: The comment string associated with the expression network that generates values connected to this input socket.
 
getState(...)
Returns: The connection state of this input socket.
type
getValue(...)
Returns: The constant value that is connected to this input socket.
 
isValidExpr(...)
Returns: True if the expression currently set on the input socket is valid.
 
setAnimCurve(...)
Sets the complete animation curve on the input value, which is expressed as a list of tuples.
 
setAnimKey(...)
The type of 'value' depends on the data type of the input socket.
 
setExpr(...)
Sets the expression string that generates values connected to this input socket.
 
setExprComment(...)
Sets the comment string associated with the expression network that generates values connected to this input socket.
 
setValue(...)
Sets the constant value that is connected to this input socket.

Inherited from Input: __rshift__, connect, disconnect, getInputPolicy, getOutput, getOwnerInput

Inherited from Socket: __cmp__, __init__, __reduce__, getDataType, getDirection, getGraph, getId, getLayout, getLifeScope, getName, getNode, getQualifiedName, isConnected, setName

Inherited from Boost.Python.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

clearAnim(...)

 

Removes the animation curve and replaces it with the given constant value. The type of value depends on the data type of the input socket.

Parameters:
  • value (type)

evaluate(...)

 

Evaluates the value of the input at the specified time (as a float in seconds) no matter what the connection state of the input is (constant, animated, expression or others).

If possible, the operation is carried out in the main thread, but depending on the connection state of the input, the evaluation might involve the processing graph and potentially heavy computations in other thread(s).

Parameters:
  • time (float) - Time in seconds. Optional; defaults to zero.
Returns: type depends on the input socket type.
The value evaluated at the specified time.

getAnimCurve(...)

 
Parameters:
  • includeTangents - Default is False.
Returns: tuple
The complete animation curve on the input value. By default, returns the curve without the tangents, which is expressed as a list of (time, value) tuples; one for each keyframe on the animation curve. If the includeTangents parameter is set, the tangents are returned as well. The curve is then expressed as a list of ((time, value), (time, value), (time, value)).

getAnimValue(...)

 
Parameters:
  • time (float)
Returns: type
The animated value (curve) that is connected to this input socket, at the specified time (as a float in seconds).

Note that this method does not return the keys, but rather evaluates the curve at the specified time.

getExpr(...)

 
Returns: str
The expression string that generates values connected to this input socket.

getExprComment(...)

 
Returns: str
The comment string associated with the expression network that generates values connected to this input socket.

getState(...)

 
Returns:
The connection state of this input socket. The valid types are available as a module-level enum:

You can change the connection state by using the following methods to set the network connected to this input:

The type of the values in these methods is determined by the data type of the input socket.

Note that attempting to get the value of an input with a method corresponding to a certain connect state will result in an exception if an input is not connected to a node network such that the connect state matches. Also, using one of the set methods resets the node network connected to the input socket if the connect state does not match.

getValue(...)

 
Returns: type
The constant value that is connected to this input socket. The return type is determined by the data type of the input socket.

isValidExpr(...)

 
Returns:
True if the expression currently set on the input socket is valid.

setAnimCurve(...)

 

Sets the complete animation curve on the input value, which is expressed as a list of tuples. There can be two kind of items in the list. Item (time, value) is a single key with its value. Item ((time, value), (time, value), (time, value)) is the left key frame, followed by the key and value and the right keyframe. When setting the animation curve, the current animation curve is cleared first.

Parameters:
  • animCurve (list of tuple) - Animation curve.

setExpr(...)

 

Sets the expression string that generates values connected to this input socket. This method additionally validates and applies the expression.

Parameters:
  • exprString (str)

setExprComment(...)

 

Sets the comment string associated with the expression network that generates values connected to this input socket.

Parameters:
  • commentString (str)

setValue(...)

 

Sets the constant value that is connected to this input socket. The value type is determined by the data type of the input socket.

Parameters:
  • value (type)