from weSkel.src.core.node.abstract.dg.lib import DGNodeIn Maya or in a Python script run by Maya / initialized mayapy, with weSkel available. Importing om is only required when using OpenMaya types in your own code.
Dependency Graph node names, plugs, creation and SVD state.
from weSkel.src.core.node.abstract.dg.lib import DGNodeIn Maya or in a Python script run by Maya / initialized mayapy, with weSkel available. Importing om is only required when using OpenMaya types in your own code.
| Item | Value |
|---|---|
| Class | DGNode |
| Module | weSkel.src.core.node.abstract.dg.lib |
| Direct parent | Node |
| Represented direct descendants | ContainerBase, GeometryFilter, MultMatrix, Network… |
| Own members | 15 Python properties + 6 spec properties; 7 methods defined or overridden here. |
Parent members remain available. Each section includes collapsible tables grouped by parent class, with links to the full contracts. Private methods and standard Python mechanisms are outside this inventory.
Signature : DGNode(node) → DGNode or an already registered compatible subclass.
| Parameter | Accepted types | Default |
|---|---|---|
node |
str, om.MObject, om.MObjectHandle, om.MFnDependencyNode |
Required |
Wraps an existing node or stages a wrapper if the name is unresolved; creates no node. For another wrapper, pass other.mobject. The shared registry preserves identity and may return the existing concrete wrapper. Incompatible input can raise TypeError, and identity conflicts RuntimeError.
Python properties defined on this class. om means maya.api.OpenMaya. Spec-generated properties are detailed in the following section.
| Property | Return type | Access |
|---|---|---|
dep_fn |
om.MFnDependencyNode |
R |
uuid |
str | None |
R |
name |
str | None |
R/W |
absolute_name |
str | None |
R |
stripped_name |
str | None |
R/W |
namespace |
str | None |
R/W |
plugs |
Plugs | None |
R |
is_valid_dep_fn |
bool |
R |
is_default_node |
bool |
R |
is_from_referenced_file |
bool |
R |
is_locked |
bool |
R/W |
is_shared |
bool |
R |
plugin_name |
str | None |
R |
affect_animation |
bool |
R |
type |
str | None |
R/W |
Live function set; unattached object when the node is missing. Check exists before using it.
| Item | Type / behavior |
|---|---|
| Returns | om.MFnDependencyNode |
Live UUID, or the last staged value if still available. Do not use the name as identity.
| Item | Type / behavior |
|---|---|
| Returns | str | None |
Live name, otherwise staged name. The setter renames an existing node or stages a missing wrapper name; Maya may adjust a conflicting name.
| Item | Type / behavior |
|---|---|
| Returns | str | None |
node.name = value |
str |
Absolute namespace name from MFnDependencyNode.absoluteName(); None without a node. Use full_path_name for a full DAG path.
| Item | Type / behavior |
|---|---|
| Returns | str | None |
Name without its namespace, or None when unnamed. The setter keeps the current namespace.
| Item | Type / behavior |
|---|---|
| Returns | str | None |
node.stripped_name = value |
str |
Normalized namespace such as a:b; None at the root. The setter creates required namespaces for a live node. None, "" and ":" request the root.
| Item | Type / behavior |
|---|---|
| Returns | str | None |
node.namespace = value |
str | None |
Live node plug manager; None otherwise. node.plugs["message"] returns a Plug.
| Item | Type / behavior |
|---|---|
| Returns | Plugs | None |
Function-set compatibility with the current MObject.
| Item | Type / behavior |
|---|---|
| Returns | bool |
Whether this is a Maya default node; False without a node.
| Item | Type / behavior |
|---|---|
| Returns | bool |
Whether the node comes from a referenced file; False without a node.
| Item | Type / behavior |
|---|---|
| Returns | bool |
Node lock, separate from plug locks. The setter changes the live node and stages the value for later creation.
| Item | Type / behavior |
|---|---|
| Returns | bool |
node.is_locked = value |
bool |
Shared state reported by Maya; False without a node.
| Item | Type / behavior |
|---|---|
| Returns | bool |
Associated Maya plugin name, possibly an empty string; None without a node.
| Item | Type / behavior |
|---|---|
| Returns | str | None |
Result of MFnDependencyNode.affectsAnimation(); False without a node.
| Item | Type / behavior |
|---|---|
| Returns | bool |
Live native type or staged type. The setter only works without a live node; otherwise it raises RuntimeError. A concrete wrapper normally defines its type through NODE_TYPE.
| Item | Type / behavior |
|---|---|
| Returns | str | None |
node.type = value |
str |
Node10| Property | Return type | Access | Description |
|---|---|---|---|
mobject |
om.MObject |
R/W | Live Maya object, or a null object. |
mobject_handle |
om.MObjectHandle |
R/W | Handle associated with the node. |
api_type |
int | None |
R | Maya API type identifier. |
api_type_str |
str |
R | API type name, for example "kTime". |
exists |
bool |
R | The wrapper currently has a live node. |
is_null |
bool |
R | The returned Maya object is null. |
is_alive |
bool |
R | The object exists with a valid, live handle. |
is_valid_handle |
bool |
R | Validity of the stored handle. |
is_dag_node |
bool |
R | Compatibility with om.MFn.kDagNode. |
hash_code |
int |
R | Maya handle hash. |
Python and Maya names are reproduced exactly. Declared kind, Python return and declared default are different facts. A spec default is not necessarily the live node value, nor a value automatically written at creation.
The returns below describe this class descriptors; live observations use a network, container, transform, mesh or skinCluster as appropriate. Some plugs depend on the concrete type. A subclass may override a member and its write capabilities. Proxy names identify current results: do not import their private classes.
| Form | Usage |
|---|---|
_ValuePlugProxy |
.value reads the value; .plug gives a Plug, .mplug an MPlug. |
IndexedPathProxy |
Indexed access object. Resolution has limitations at this checkpoint: member cards provide verified alternatives using node.plugs[...]. |
| Flags / writing | stored, input, output, connectable describe the replay contract. They do not guarantee a native plug is editable in its current state. |
For writes where failure must be checked, use the Plug explicitly and verify live state: some descriptor setters can stage a value without propagating a Maya write error.
| Property | Maya plug | Returns |
|---|---|---|
message |
message |
None |
frozen |
frozen |
_ValuePlugProxy · .value: bool |
is_historically_interesting |
isHistoricallyInteresting |
_ValuePlugProxy · .value: int |
bin_membership |
binMembership |
_ValuePlugProxy · .value: str |
caching_enabled |
caching |
_ValuePlugProxy · .value: bool |
caching_node_state |
nodeState |
_ValuePlugProxy · .value: int |
Node message plug; used for connections, with no numeric value.
| Item | Type / behavior |
|---|---|
| Declared Maya path | message |
| Property return | None |
| Declared spec kind | message |
| Declared default | None |
| Flags | output, connectable, hidden |
The descriptor setter raises AttributeError. Manage connections with node.plugs[...]; this property does not return the connected node.
Native evaluation freeze state.
| Item | Type / behavior |
|---|---|
| Declared Maya path | frozen |
| Property return | _ValuePlugProxy · .value: bool |
| Declared spec kind | numeric:bool |
| Declared default | False |
| Flags | output, input, connectable, stored |
| Read the value | node.frozen.value |
| Assignment | node.frozen = value |
Node interest level in Maya history.
| Item | Type / behavior |
|---|---|
| Declared Maya path | isHistoricallyInteresting |
| Property return | _ValuePlugProxy · .value: int |
| Declared spec kind | numeric:byte |
| Declared default | 2 |
| Flags | output, input, connectable, stored, hidden |
| Read the value | node.is_historically_interesting.value |
| Assignment | node.is_historically_interesting = value |
Maya bin membership.
| Item | Type / behavior |
|---|---|
| Declared Maya path | binMembership |
| Property return | _ValuePlugProxy · .value: str |
| Declared spec kind | typed:string |
| Declared default | '' |
| Flags | output, input, stored, hidden |
| Read the value | node.bin_membership.value |
| Assignment | node.bin_membership = value |
Native node caching switch.
| Item | Type / behavior |
|---|---|
| Declared Maya path | caching |
| Property return | _ValuePlugProxy · .value: bool |
| Declared spec kind | numeric:bool |
| Declared default | False |
| Flags | output, input, connectable, stored |
| Read the value | node.caching_enabled.value |
| Assignment | node.caching_enabled = value |
Native nodeState evaluation state.
| Item | Type / behavior |
|---|---|
| Declared Maya path | nodeState |
| Property return | _ValuePlugProxy · .value: int |
| Declared spec kind | enum |
| Declared default | 0 |
| Flags | output, input, connectable, stored |
| Read the value | node.caching_node_state.value |
| Assignment | node.caching_node_state = value |
| Method | Returns |
|---|---|
create |
None |
delete |
None |
snapshot |
DGSnapshot |
snapshot_svd |
SVDSnapshot |
svd |
SVDView |
finalize |
None |
clear_attr_cache |
None |
Creates a missing node; does nothing if it already exists. A node type must be defined. Use a concrete wrapper for normal creation. Staged state is replayed with values and connections in strict mode.
| Item | Type / behavior |
|---|---|
| Returns | None |
RuntimeError when no type is defined; native creation or replay errors. Returns None, not the wrapper.
Disconnects live connections, detaches the wrapper and deletes the node. Does nothing without a live node. snapshot=False skips capture when state will be rebuilt another way.
| Item | Type / behavior |
|---|---|
| Returns | None |
snapshot |
bool · default True — Retain state for recreation. |
Recreation produces a new Maya object: this is neither identity preservation nor a global Undo operation.
Captures and stores an identity and spec-driven SVD dictionary. Native values can contain API objects: this result is not guaranteed to be JSON serializable.
| Item | Type / behavior |
|---|---|
| Returns | DGSnapshot |
profile |
str · default "rig" — Label stored in the result; no general profile-based filter. |
This does not capture the whole scene or every arbitrary dynamic attribute.
Captures Source / Value / Destinations for the requested list. Returns an SVDSnapshot, distinct from the snapshot() dictionary. Attributes that fail lookup are skipped.
| Item | Type / behavior |
|---|---|
| Returns | SVDSnapshot |
attrs |
Iterable[str] · default — — Maya attribute names to capture. |
RuntimeError without a live node. Do not pass this container directly to finalize() as a DGSnapshot.
Returns a read-only live view of source, value and destinations; it is not a frozen capture.
| Item | Type / behavior |
|---|---|
| Returns | SVDView |
plug |
Plug | om.MPlug | str · default — — Plug or Maya attribute name. |
RuntimeError without a live node; check the requested name before use. Resolution errors depend on plug access.
Applies all sources, then undriven values, then destinations; enabled FSET dispatch follows. Preserves addressed value locks and skips driven leaves. Does nothing without an explicit or stored state.
| Item | Type / behavior |
|---|---|
| Returns | None |
snapshot |
Mapping[str, Any] | None · default None — Dictionary to replay; otherwise the last stored state. |
apply_values |
bool · default True — Apply storable, undriven values. |
apply_connections |
bool · default True — Replay sources and destinations allowed by flags. |
apply_fset |
bool · default False — Execute fset entries containing name, args, kwargs. |
strict |
bool · default False — Raise the original error with context; otherwise warn and continue. |
No general rollback: errors may occur after mutations. Existing connections and array indices absent from the snapshot are not globally removed. None is not a success report.
Clears this instance attribute cache; does not delete nodes or clear the global wrapper registry.
| Item | Type / behavior |
|---|---|
| Returns | None |
DGSnapshot structure — Python dictionary with optional fields:
| Fields | Type |
|---|---|
schema_version, profile, type |
str |
uuid, name, long_name, namespace |
str | None |
is_locked |
bool | None |
svd |
tuple[dict, ...] |
fset |
tuple[Any, ...] |
snapshot() uses schema_version="dg-1.0". SVD entries include attr, plug, flags and, as applicable, sources, value, destinations. Serialized paths do not become persistent UUID references.
Node2| Method | Returns | Description |
|---|---|---|
has_fn(fn_type) |
bool |
Test compatibility with a Maya function set. |
clear_node_registry() |
None |
Detach registered wrappers and clear their shared registry. |
| Attribute | Type | Value / role |
|---|---|---|
NODE_TYPE |
str | None |
"" |
SPEC_LAYERS |
list[SpecLayer] |
[get_dg_specs_all] |
Attributes defined or overridden here. NODE_REGISTRY is inherited from Node. COMPATIBLE_MAYA_FN_TYPES is inherited; for a class with explicit NODE_TYPE, its use also depends on the compatibility policy described under Constructor.
The DGSnapshot types exported by these modules are TypedDict descriptions, not classes to instantiate for capture. Use node.snapshot().
| Point | Behavior |
|---|---|
| Identity | The wrapper follows the Maya object; a replacement with the same name is not the same node. |
| Reading | Live reads take priority; check exists before native operations. |
| Specs | Describe existing plugs; do not automatically add Maya attributes. |
| Examples | The demonstration creates and deletes only its own nodes with a random name suffix. |
Self-contained example for the Maya Python Script Editor. To run it in mayapy, initialize maya.standalone before this block and shut it down afterwards, as shown in the Node.
from uuid import uuid4from weSkel.src.core.node.abstract.dg.lib import DGNodefrom weSkel.src.core.node.dg.network.lib import Network
node = Network("api_dg_" + uuid4().hex[:8])try: node.create() assert DGNode(node.dep_fn) is node node.caching_enabled = True assert node.caching_enabled.value is True state = node.snapshot() assert isinstance(state, dict) node.caching_enabled = False node.finalize(state, apply_connections=False, strict=True) assert node.caching_enabled.value is True assert node.snapshot_svd(["caching"]) is not None assert node.svd("caching") is not None print("DGNode: identity, plugs and replay OK")finally: node.delete(snapshot=False)Expected result : DGNode: identity, plugs and replay OK. Demonstration nodes are removed in finally.
SDK checkpoint 87c3486 reference. Inventory and examples checked against source under Maya 2025.3 and 2026.3; this does not validate the compiled package.