Class plug
source code
object --+
|
iPlug --+
|
plug
- Known Subclasses:
-
Defines an interface allowing to compare compatabilies according to types.
Plugs are implemented as descriptors, thus they will be defined on node class
level, and all static information will remain static
As descriptors, they are defined statically on the class, and some additional information
such as connectivity, is stored on the respective class instance. These special methods
are handled using NodeBase class
Plugs are implemented as descriptors as all type information can be kept per class,
whereas only connection information changes per node instance.
Plugs can either be input plugs or output plugs - output plugs affect no other
plug on a node, but are affected by 0 or more plugs
Note:
class is lowercase as it is used as descriptor ( acting more like a function )
|
setName(self,
name)
Set the name of this plug - can be set only once |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|
|
|
|
__get__(self,
obj,
cls=None)
A value has been requested - return our plugshell that brings together
both, the object and the static plug |
source code
|
|
Inherited from iPlug :
__str__
|
|
|
|
affects(self,
otherplug)
Set an affects relation ship between this plug and otherplug, saying
that this plug affects otherplug. |
source code
|
|
|
affected(self)
Returns:
tuple containing affected plugs ( plugs that are affected by our value ) |
source code
|
|
|
affectedBy(self)
Returns:
tuple containing plugs that affect us ( plugs affecting our value ) |
source code
|
|
|
|
|
|
Inherited from object :
__class__
|
Intialize the plug with a distinctive name
- Overrides:
object.__init__
|
Set an affects relation ship between this plug and otherplug, saying
that this plug affects otherplug.
- Overrides:
iPlug.affects
|
- Returns:
- tuple containing affected plugs ( plugs that are affected by our value )
- Overrides:
iPlug.affected
|
- Returns:
- tuple containing plugs that affect us ( plugs affecting our value )
- Overrides:
iPlug.affectedBy
|
- Returns:
- True if this is an output plug that can trigger computations
- Overrides:
iPlug.providesOutput
|
- Returns:
- True if this is an input plug that will never cause computations
- Overrides:
iPlug.providesInput
|