Own methods.
| Method |
Return type |
Purpose |
to_mplug_array |
om.MPlugArray |
Create a native om.MPlugArray containing the same plugs. |
from_iter |
PlugArray |
Build a collection from an iterable; class method. |
filter |
PlugArray |
Keep plugs for which the predicate returns true. |
connected |
PlugArray |
Filter connected plugs by source or destination role. |
of_type |
PlugArray |
Filter by API attribute type identifiers. |
match |
PlugArray |
Filter names with an fnmatch pattern. |
disconnect_all_inputs |
None |
Disconnect each plug’s inputs in sequence. |
disconnect_all_outputs |
None |
Disconnect each plug’s outputs in sequence. |
disconnect_all |
None |
Disconnect all relationships of each plug in sequence. |
connect_to |
None |
Connect the source collection to destinations. |
connect_from |
None |
Connect sources to this destination collection. |
disconnect_to |
None |
Disconnect relationships to targets; provide explicit targets. |
disconnect_from |
None |
Disconnect relationships from sources, or the current inputs. |
plugs.to_mplug_array()Method
| Returns |
Contract |
om.MPlugArray |
Create a native om.MPlugArray containing the same plugs. |
PlugArray.from_iter(iterable: Iterator[Plug])Method
| Parameter |
Type |
Default |
iterable |
Iterator[Plug] |
required |
| Returns |
Contract |
PlugArray |
Build a collection from an iterable; class method. |
plugs.filter(fn: Callable[[Plug], bool])Method
| Parameter |
Type |
Default |
fn |
Callable[[Plug], bool] |
required |
| Returns |
Contract |
PlugArray |
Keep plugs for which the predicate returns true. |
plugs.connected(what: str='any')Method
| Parameter |
Type |
Default |
what |
str |
'any' |
| Returns |
Contract |
PlugArray |
Filter connected plugs by source or destination role. |
what accepts only "any", "source" or "destination"; another value raises ValueError.
plugs.of_type(attr_types: Set[int])Method
| Parameter |
Type |
Default |
attr_types |
Set[int] |
required |
| Returns |
Contract |
PlugArray |
Filter by API attribute type identifiers. |
plugs.match(pattern: str, where: str='full')Method
| Parameter |
Type |
Default |
pattern |
str |
required |
where |
str |
'full' |
| Returns |
Contract |
PlugArray |
Filter names with an fnmatch pattern. |
where is "full" (native name), "long" or "short". All include the node name. Patterns use fnmatch, not regular expressions. Unknown mode: ValueError.
plugs.disconnect_all_inputs()Method
| Returns |
Contract |
None |
Disconnect each plug’s inputs in sequence. |
plugs.disconnect_all_outputs()Method
| Returns |
Contract |
None |
Disconnect each plug’s outputs in sequence. |
plugs.disconnect_all()Method
| Returns |
Contract |
None |
Disconnect all relationships of each plug in sequence. |
plugs.connect_to(targets: Union['PlugArray', Plug], *, force: bool=False, clear_dest: bool=False)Method
| Parameter |
Type |
Default |
targets |
Union[PlugArray, Plug] |
required |
force |
bool |
False |
clear_dest |
bool |
False |
| Returns |
Contract |
None |
Connect the source collection to destinations. |
Two PlugArray objects are paired by position and must have equal lengths (ValueError otherwise). A single source can fan out through destinations.connect_from(source). Several sources into one scalar plug do not form a valid blend. Occupied targets are preserved without explicit replacement. Null plugs are skipped; check expected connections after calling. clear_dest=True or force=True replace existing destination inputs.
plugs.connect_from(sources: Union['PlugArray', Plug], *, force: bool=False, clear_src: bool=False)Method
| Parameter |
Type |
Default |
sources |
Union[PlugArray, Plug] |
required |
force |
bool |
False |
clear_src |
bool |
False |
| Returns |
Contract |
None |
Connect sources to this destination collection. |
Two PlugArray objects are paired by position and must have equal lengths (ValueError otherwise). A single source can fan out through destinations.connect_from(source). Several sources into one scalar plug do not form a valid blend. Occupied targets are preserved without explicit replacement. Null plugs are skipped; check expected connections after calling. Despite its name, clear_src=True clears the input of self’s destinations, not the source’s outputs. Here it has the same replacement effect as force=True.
plugs.disconnect_to(targets: Optional[Union['PlugArray', Plug]]=None)Method
| Parameter |
Type |
Default |
targets |
Optional[Union[PlugArray, Plug]] |
None |
| Returns |
Contract |
None |
Disconnect relationships to targets; provide explicit targets. |
Reproduced limitation: without targets, the current path uses an incompatible connectedTo signature and raises TypeError. Supply an explicit Plug or PlugArray, or use disconnect_all_outputs(). Two collections must have matching lengths.
plugs.disconnect_from(sources: Optional[Union['PlugArray', Plug]]=None)Method
| Parameter |
Type |
Default |
sources |
Optional[Union[PlugArray, Plug]] |
None |
| Returns |
Contract |
None |
Disconnect relationships from sources, or the current inputs. |
sources=None removes current native inputs. A single plug applies to every destination; two collections pair by position and require equal lengths. Lock flags are restored.