Epydoc: mrv.automation.attributes
Contains specialized attributes that judge value based on different criteria, allowing more elaborate typechecking
Epydoc: mrv.automation.attributes
Bases: object
Simple class defining the type of a plug and several flags that affect it. Additionally it can determine how well suited another attribute is
Nodes are automatically computable if they are affected by another plug. If this is not the case, they are marked input only and are not computed. If this flag is true, even unaffeted plugs are computable. Plugs that affect something are automatically input plugs and will not be computed. If the plug does not affect anything and this flag is False, they are seen as input plugs anyway.
The system does not allow plugs to be input and output plugs at the same time, thus your compute cannot be triggered by your own compute
cls: if True, the plug requires classes to be set ( instances of ‘type’ ) , but no instances of these classes uncached: if False, computed values may be cached, otherwise they will always be recomputed. unconnectable: if True, the node cannot be the destination of a connection check_passing_values: check each value as it flows through a connection - usually compatability is only checked on connection and once values are set, but not if they flow through an existing connection
Compute affinity for otherattr.
Returns: | rating from 0 to 255 defining how good the attribtues match each other in general - how good can we store values of otherattr ? Thus this comparison is directed. |
---|---|
Note: | for checking connections, use connectionAffinity |
Compute value’s compatability rate
Returns: | value between 0 and 255, 0 means no compatability, 255 a perfect match. if larger than 0, the plug can hold the value ( assumed the flags are set correctly ). |
---|
Compute connection affinity for given destination attribute
Returns: | rating from 0 to 255 defining the quality of the connection to otherplug. an affinity of 0 mean connection is not possible, 255 mean the connection is perfectly suited. The connection is a directed one from self -> otherplug |
---|
Returns: | default value stored for this attribute, or raise |
---|---|
Note: | handles dynamic defaults, so you should not directly access the default member variable |
Raises MissingDefaultValueError: | |
if attribute does not have a default value | |
Raises TypeError: | |
if value returned by dynamic attribute has incorrect type |
Epydoc: mrv.automation.attributes.RegexStringAttr
Bases: mrv.dge.Attribute
Attribute that accepts string values matching a given regular expression
Compute affinity for otherattr.
Returns: | rating from 0 to 255 defining how good the attribtues match each other in general - how good can we store values of otherattr ? Thus this comparison is directed. |
---|---|
Note: | for checking connections, use connectionAffinity |
Returns: | rate of base class provided that the regex matches, 0 otherwise |
---|
Compute connection affinity for given destination attribute
Returns: | rating from 0 to 255 defining the quality of the connection to otherplug. an affinity of 0 mean connection is not possible, 255 mean the connection is perfectly suited. The connection is a directed one from self -> otherplug |
---|
Returns: | default value stored for this attribute, or raise |
---|---|
Note: | handles dynamic defaults, so you should not directly access the default member variable |
Raises MissingDefaultValueError: | |
if attribute does not have a default value | |
Raises TypeError: | |
if value returned by dynamic attribute has incorrect type |