from weSkel.src.core.props.svd import SVDPlugRun in Maya with weSkel available. om.* types refer to maya.api.OpenMaya.
SVD data captured for one attribute.
SVDPlug stores the SVD data of an attribute. Its constructor receives this data; use svd_from_plug(plug) to read it from Maya.
objectSVDPlugfrom weSkel.src.core.props.svd import SVDPlugRun in Maya with weSkel available. om.* types refer to maya.api.OpenMaya.
| Item | Value |
|---|---|
| Class | SVDPlug |
| Module | weSkel.src.core.props.svd |
| Direct parent | object |
| Kind | dataclass; frozen=True |
| Spec properties | None. |
This reference documents members defined by this class. Standard Python mechanisms and native inherited members are outside its member counts.
SVDPlug(attr: str, source: Optional[str], value: Any, destinations: List[str] = []) → SVDPlug
| Parameter | Type | Default |
|---|---|---|
attr |
str |
required |
source |
Optional[str] |
required |
value |
Any |
required |
destinations |
List[str] |
[] |
The first three parameters are required. destinations receives a new empty list when omitted. svd_from_plug(plug) -> SVDPlug, imported from the same module, captures connection names and the current value. For deep copying and serialization, see the behavior notes below.
Declared fields; a frozen dataclass prevents reassignment, not all nested mutations.
| Field | Return type | Access | Purpose |
|---|---|---|---|
attr |
str |
R | Captured long attribute name without the node name. |
source |
Optional[str] |
R | Captured full source name, or None. |
value |
Any |
R | Value supplied during capture or construction. |
destinations |
List[str] |
R | List of captured full destination names. |
| Return type | Contract |
|---|---|
str |
Captured long attribute name without the node name. |
| Return type | Contract |
|---|---|
Optional[str] |
Captured full source name, or None. |
| Return type | Contract |
|---|---|
Any |
Value supplied during capture or construction. |
| Return type | Contract |
|---|---|
List[str] |
List of captured full destination names. |
The frozen dataclass prevents field reassignment, but destinations and mutable values can still be changed. This is not deep immutability.
Captured names do not follow renames. value may contain Maya objects; general JSON serialization and independent copies of all geometry are not guaranteed. Manually constructing an entry does not query Maya.
from uuid import uuid4from weSkel.src.core.node.dag.transform.lib import Transformfrom weSkel.src.core.props.svd import SVDPlug, svd_from_plug
node = Transform("sdk_capture_" + uuid4().hex[:8])try: node.create() plug = node.plugs["scaleX"] plug.value = 2.0 entry = svd_from_plug(plug) assert isinstance(entry, SVDPlug) plug.value = 5.0 assert entry.attr == "scale.scaleX" and entry.value == 2.0 assert entry.source is None and entry.destinations == [] print("SVDPlug: PASS")finally: node.delete(snapshot=False)Expected result: SVDPlug: PASS. Temporary nodes are removed in finally.
See also: SVDView · SVDSnapshot · FSEntry.