Plug¶

-
class
Plug¶ Bases:
pybind11_builtins.pybind11_objectA node plug.
A Plug is a node attribute. It can hold a Value object.
A Plug can be an input Plug, in that case, another plug can be connected into it and propagate its value in it.
A plug can be an output Plug, in that case, its value is evaluated using dependancies on other plugs and an evaluation function. Output Plugs can’t have an input connection.
The Value of a Plug can be :
- The Plug stored Value
- The Value of the input connected Plug, for input Plugs.
- The computed Value for output Plugs.
Constructors
__init__Methods
__eq____ne__as_Box3f()Returns the plug value as a Box3f. as_Color4f()Returns the plug value as a Color4f. as_M44f()Returns the plug value as a M44f. as_Quatf()Returns the plug value as a Quatf. as_V2f()Returns the plug value as a V2f. as_V2i()Returns the plug value as a V2i. as_V3f()Returns the plug value as a V3f. as_V3i()Returns the plug value as a V3i. as_V4f()Returns the plug value as a V4f. as_V4i()Returns the plug value as a V4i. as_bool()Returns the plug value as a bool. as_float()Returns the plug value as a float. as_int()Returns the plug value as an integer. as_string()Returns the plug value as a string. can_connect(other)Check if the plug can be connected. channels()Return this plug exposed channels. connect(src)Connect src to this plug. description()rtype: unicode disconnect(undo_stack)type undo_stack: bool has_node()rtype: bool input()Get the input plug. is_channel()Return true if this plug is a channel. is_connected()Return true if the plug has an input connection. is_internal()Return true if this plug should be ignored by users and the UI. name()Return the plug name. nice_name()rtype: unicode node()rtype: Node outputs()Return the node plugs iteration. set_value(value)Set a value. touch()type_name()rtype: unicode value()Get the plug Value. -
as_Box3f() → Imath.Box3f¶ Returns the plug value as a Box3f.
You must be sure the plug value is a Box3f or you will have an empty box.
Return type: Imath.Box3f
-
as_Color4f() → Imath.Color4f¶ Returns the plug value as a Color4f.
You must be sure the plug value is a Color4f or you will have {0,0,0,0}.
Return type: Imath.Color4f
-
as_M44f() → Imath.M44f¶ Returns the plug value as a M44f.
You must be sure the plug value is a M44f or you will have an identity matrix.
Return type: Imath.M44f
-
as_Quatf() → Imath.Quatf¶ Returns the plug value as a Quatf.
You must be sure the plug value is a Quatf or you will have an identity quaternion.
Return type: Imath.Quatf
-
as_V2f() → Imath.V2f¶ Returns the plug value as a V2f.
You must be sure the plug value is a V2f or you will have {0,0}.
Return type: Imath.V2f
-
as_V2i() → Imath.V2i¶ Returns the plug value as a V2i.
You must be sure the plug value is a V2i or you will have {0,0}.
Return type: Imath.V2i
-
as_V3f() → Imath.V3f¶ Returns the plug value as a V3f.
You must be sure the plug value is a V3f or you will have {0,0,0}.
Return type: Imath.V3f
-
as_V3i() → Imath.V3i¶ Returns the plug value as a V3i.
You must be sure the plug value is a V3i or you will have {0,0,0}.
Return type: Imath.V3i
-
as_V4f() → Imath.V4f¶ Returns the plug value as a V4f.
You must be sure the plug value is a V4f or you will have {0,0,0,0}.
Return type: Imath.V4f
-
as_V4i() → Imath.V4i¶ Returns the plug value as a V4i.
You must be sure the plug value is a V4i or you will have {0,0,0,0}.
Return type: Imath.V4i
-
as_bool() → bool¶ Returns the plug value as a bool.
You must be sure the plug value is an integer, a float or a boolean or you get false.
Return type: bool
-
as_float() → float¶ Returns the plug value as a float.
You must be sure the plug value is an integer, a float or a boolean or you get 0.f.
Return type: float
-
as_int() → int¶ Returns the plug value as an integer.
You must be sure the plug value is an integer, a float or a boolean or you get 0.
Return type: int
-
as_string() → unicode¶ Returns the plug value as a string.
You must be sure the plug value is a string or you will have an empty string.
Return type: unicode
-
can_connect(other: Plug) → bool¶ Check if the plug can be connected.
Check if a loop can be be created by connecting those two plugs
Parameters: other (Plug) – The plug to be connected Return type: bool
-
connect(src: Plug, undo_stack: bool, serialize: bool) → None¶ Connect src to this plug.
The value of src will be propagated to this plug.If true, the connection will be serialized in the file. If undo_stack is true, the connection is assumed to be serialized, and serialize is ignored.
Parameters: - src (Plug) – The source plug
- undo_stack (bool) – If true, the connection is reverted if an undo is performed. Ignored if undo_stack is true.
-
description() → unicode¶ Return type: unicode
-
disconnect(undo_stack: bool) → None¶ disconnect(undo_stack: bool) -> None
-
has_node() → bool¶ Return type: bool
-
input() → Plug¶ Get the input plug.
Return type: Plug Raises: RuntimeError – if the plug is not connected
-
is_channel() → bool¶ Return true if this plug is a channel.
Return type: bool
-
is_connected() → bool¶ Return true if the plug has an input connection.
Return type: bool
-
is_internal() → bool¶ Return true if this plug should be ignored by users and the UI.
Return type: bool
-
name() → unicode¶ Return the plug name.
Return type: unicode
-
nice_name() → unicode¶ Return type: unicode
-
outputs() → Outputs¶ Return the node plugs iteration.
Return type: Outputs
-
set_value(value: Value, undo_stack: bool) → None¶ Set a value.
-
touch() → None¶
-
type_name() → unicode¶ Return type: unicode