from weSkel.src.core.node.dg.object_set.lib import ObjectSetRun in Maya or an initialized mayapy process. Import om only if your script uses OpenMaya types.
Maya sets: add, remove, read and snapshot members.
from weSkel.src.core.node.dg.object_set.lib import ObjectSetRun in Maya or an initialized mayapy process. Import om only if your script uses OpenMaya types.
| Item | Value |
|---|---|
| Classe | ObjectSet |
| Module | weSkel.src.core.node.dg.object_set.lib |
| Maya type | objectSet |
| Direct parent | ContainerBase |
| Inventory | Members defined or overridden here; inherited members are grouped by parent in each section. |
Signature : ObjectSet(node) → ObjectSet.
| Parameter | Accepted type | Default |
|---|---|---|
node |
str | om.MObject | om.MObjectHandle | om.MFnDependencyNode | om.MFnSet |
Required |
Wraps an existing node or stages a wrapper for an absent name; does not create the node. Call create() separately. An incompatible object or type can raise TypeError. Shared identity can return an already registered compatible wrapper.
Python properties defined or overridden here. R: read-only; R/W: a setter exists, subject to the member notes. om.* types belong to maya.api.OpenMaya.
| Property | Return type | Access |
|---|---|---|
mfn_set |
Optional[om.MFnSet] |
R |
members |
om.MSelectionList |
R/W |
flatten |
bool |
R/W |
MFnSet function set for the ObjectSet node.
| Item | Type / behavior |
|---|---|
| Returns | Optional[om.MFnSet] |
| Observed type on live geometry | MFnSet |
Get the members of the ObjectSet.
| Item | Type / behavior |
|---|---|
| Returns | om.MSelectionList |
| Observed type on live geometry | MSelectionList |
| Setter value | om.MSelectionList |
Before member initialization, the getter can return None despite its annotation. The setter replaces members in two steps (clear, then add), without a rollback transaction.
Whether to flatten members when retrieving them.
| Item | Type / behavior |
|---|---|
| Returns | bool |
| Observed type on live geometry | bool |
| Setter value | bool |
DGNode15| Property | Return type | Access | Description |
|---|---|---|---|
dep_fn |
om.MFnDependencyNode |
R | Live function set; unattached object when the node is missing. |
uuid |
str | None |
R | Live UUID, or the last staged value if still available. |
name |
str | None |
R/W | Live name, otherwise staged name. |
absolute_name |
str | None |
R | Absolute namespace name from MFnDependencyNode.absoluteName(); None without a node. |
stripped_name |
str | None |
R/W | Name without its namespace, or None when unnamed. |
namespace |
str | None |
R/W | Normalized namespace such as a:b; None at the root. |
plugs |
Plugs | None |
R | Live node plug manager; None otherwise. |
is_valid_dep_fn |
bool |
R | Function-set compatibility with the current MObject. |
is_default_node |
bool |
R | Whether this is a Maya default node; False without a node. |
is_from_referenced_file |
bool |
R | Whether the node comes from a referenced file; False without a node. |
is_locked |
bool |
R/W | Node lock, separate from plug locks. |
is_shared |
bool |
R | Shared state reported by Maya; False without a node. |
plugin_name |
str | None |
R | Associated Maya plugin name, possibly an empty string; None without a node. |
affect_animation |
bool |
R | Result of MFnDependencyNode.affectsAnimation(); False without a node. |
type |
str | None |
R/W | Live native type or staged type. |
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. |
Defaults and flags below are spec declarations, not guaranteed live values. A descriptor can return a proxy: .value reads its value; .plug accesses the Plug. Proxy names describe results, not private classes to import. Observed types come from a test fixture; disconnected geometry inputs may notably return None.
For writes where failure must be checked, use the Plug explicitly and verify live state. Descriptor setters do not propagate every native failure.
| Property | Maya plug | Returns |
|---|---|---|
annotation |
annotation |
_ValuePlugProxy · .value: str |
dn_set_members |
dnSetMembers |
list |
dag_set_members |
dagSetMembers |
list |
edge_only_set |
edgeOnlySet |
_ValuePlugProxy · .value: bool |
edit_points_only_set |
editPointsOnlySet |
_ValuePlugProxy · .value: bool |
facets_only_set |
facetsOnlySet |
_ValuePlugProxy · .value: bool |
group_nodes |
groupNodes |
list |
is_layer |
isLayer |
_ValuePlugProxy · .value: bool |
member_wireframe_color |
memberWireframeColor |
_ValuePlugProxy · .value: int |
partition |
partition |
None |
renderable_only_set |
renderableOnlySet |
_ValuePlugProxy · .value: bool |
used_by |
usedBy |
list |
vertices_only_set |
verticesOnlySet |
_ValuePlugProxy · .value: bool |
Access to native plug annotation.
| Item | Type / behavior |
|---|---|
| Maya path | annotation |
| Property return | _ValuePlugProxy · .value: str |
| Declared kind | typed:string |
| Declared default | '' |
| Flags | input, output, stored |
| Read | node.annotation.value |
| Descriptor assignment | node.annotation = value |
Access to native plug dnSetMembers.
| Item | Type / behavior |
|---|---|
| Maya path | dnSetMembers |
| Property return | list |
| Declared kind | array:typed:generic |
| Declared default | () |
| Flags | array, input, connectable |
Access to native plug dagSetMembers.
| Item | Type / behavior |
|---|---|
| Maya path | dagSetMembers |
| Property return | list |
| Declared kind | array:typed:generic |
| Declared default | () |
| Flags | array, input, connectable |
Access to native plug edgeOnlySet.
| Item | Type / behavior |
|---|---|
| Maya path | edgeOnlySet |
| Property return | _ValuePlugProxy · .value: bool |
| Declared kind | numeric:bool |
| Declared default | False |
| Flags | input, output, stored |
| Read | node.edge_only_set.value |
| Descriptor assignment | node.edge_only_set = value |
Access to native plug editPointsOnlySet.
| Item | Type / behavior |
|---|---|
| Maya path | editPointsOnlySet |
| Property return | _ValuePlugProxy · .value: bool |
| Declared kind | numeric:bool |
| Declared default | False |
| Flags | input, output, stored |
| Read | node.edit_points_only_set.value |
| Descriptor assignment | node.edit_points_only_set = value |
Access to native plug facetsOnlySet.
| Item | Type / behavior |
|---|---|
| Maya path | facetsOnlySet |
| Property return | _ValuePlugProxy · .value: bool |
| Declared kind | numeric:bool |
| Declared default | False |
| Flags | input, output, stored |
| Read | node.facets_only_set.value |
| Descriptor assignment | node.facets_only_set = value |
Access to native plug groupNodes.
| Item | Type / behavior |
|---|---|
| Maya path | groupNodes |
| Property return | list |
| Declared kind | array:typed:message |
| Declared default | () |
| Flags | array, input, connectable |
Access to native plug isLayer.
| Item | Type / behavior |
|---|---|
| Maya path | isLayer |
| Property return | _ValuePlugProxy · .value: bool |
| Declared kind | numeric:bool |
| Declared default | False |
| Flags | input, output, stored |
| Read | node.is_layer.value |
| Descriptor assignment | node.is_layer = value |
Access to native plug memberWireframeColor.
| Item | Type / behavior |
|---|---|
| Maya path | memberWireframeColor |
| Property return | _ValuePlugProxy · .value: int |
| Declared kind | numeric:short |
| Declared default | -1 |
| Flags | input, output, connectable, stored |
| Read | node.member_wireframe_color.value |
| Descriptor assignment | node.member_wireframe_color = value |
Access to native plug partition.
| Item | Type / behavior |
|---|---|
| Maya path | partition |
| Property return | None |
| Declared kind | message |
| Declared default | None |
| Flags | input, output, connectable |
The descriptor setter rejects assignment; use Plug connection operations.
Access to native plug renderableOnlySet.
| Item | Type / behavior |
|---|---|
| Maya path | renderableOnlySet |
| Property return | _ValuePlugProxy · .value: bool |
| Declared kind | numeric:bool |
| Declared default | False |
| Flags | input, output, stored |
| Read | node.renderable_only_set.value |
| Descriptor assignment | node.renderable_only_set = value |
Access to native plug usedBy.
| Item | Type / behavior |
|---|---|
| Maya path | usedBy |
| Property return | list |
| Declared kind | array:typed:message |
| Declared default | () |
| Flags | array, input, output, connectable |
Access to native plug verticesOnlySet.
| Item | Type / behavior |
|---|---|
| Maya path | verticesOnlySet |
| Property return | _ValuePlugProxy · .value: bool |
| Declared kind | numeric:bool |
| Declared default | False |
| Flags | input, output, stored |
| Read | node.vertices_only_set.value |
| Descriptor assignment | node.vertices_only_set = value |
ContainerBase21| Property | Maya plug | Returns | Description |
|---|---|---|---|
black_box |
blackBox |
_ValuePlugProxy · .value: bool |
Maya container black-box presentation. |
border_connections |
borderConnections |
list[str] |
Container boundary connection data. |
creator |
creator |
_ValuePlugProxy · .value: str |
Container creator metadata. |
creation_date |
creationDate |
_ValuePlugProxy · .value: str |
Creation date metadata. |
custom_treatment |
customTreatment |
_ValuePlugProxy · .value: str |
Custom container treatment. |
hyper_layout |
hyperLayout |
None |
Connection to the Hypergraph layout. |
icon_name |
iconName |
_ValuePlugProxy · .value: str |
Icon name associated with the container. |
is_collapsed |
isCollapsed |
_ValuePlugProxy · .value: bool |
Collapsed container state in Maya views. |
is_hierarchical_connection |
isHierarchicalConnection |
TypedArrayProxy |
Hierarchical connection flags. |
rmb_command |
rmbCommand |
_ValuePlugProxy · .value: str |
Container context-menu command. |
template_name |
templateName |
_ValuePlugProxy · .value: str |
Container template name. |
template_path |
templatePath |
_ValuePlugProxy · .value: str |
Container template path. |
template_version |
templateVersion |
_ValuePlugProxy · .value: int |
Container template version. |
container_type |
containerType |
_ValuePlugProxy · .value: str |
Container type metadata. |
ui_treatment |
uiTreatment |
_ValuePlugProxy · .value: int |
Container presentation mode. |
view_mode |
viewMode |
_ValuePlugProxy · .value: int |
Container view mode. |
view_name |
viewName |
_ValuePlugProxy · .value: str |
Container view name. |
published_node_info |
publishedNodeInfo |
ArrayCompoundProxy |
Array of published-node information. |
published_node |
publishedNodeInfo[].publishedNode |
IndexedPathProxy |
Connection to the published node at a given index. |
is_hierarchical_node |
publishedNodeInfo[].isHierarchicalNode |
IndexedPathProxy |
Hierarchical flag of a published node. |
published_node_type |
publishedNodeInfo[].publishedNodeType |
IndexedPathProxy |
Declared type of a published node. |
DGNode6| Property | Maya plug | Returns | Description |
|---|---|---|---|
message |
message |
None |
Node message plug; used for connections, with no numeric value. |
frozen |
frozen |
_ValuePlugProxy · .value: bool |
Native evaluation freeze state. |
is_historically_interesting |
isHistoricallyInteresting |
_ValuePlugProxy · .value: int |
Node interest level in Maya history. |
bin_membership |
binMembership |
_ValuePlugProxy · .value: str |
Maya bin membership. |
caching_enabled |
caching |
_ValuePlugProxy · .value: bool |
Native node caching switch. |
caching_node_state |
nodeState |
_ValuePlugProxy · .value: int |
Native nodeState evaluation state. |
| Method | Returns |
|---|---|
create |
None |
snapshot |
ObjectSetSnapshot |
finalize |
None |
get_members |
om.MSelectionList |
clear_members |
None |
add_members |
None |
add_member |
None |
remove_members |
None |
remove_member |
None |
is_member |
bool |
Creates the set with staged members, then replays any stored snapshot. Does nothing if the set already exists.
| Item | Type / behavior |
|---|---|
| Returns | None |
Take a snapshot of the ObjectSet node.
| Item | Type / behavior |
|---|---|
| Returns | ObjectSetSnapshot |
profile |
str · default: 'rig' |
Members are recorded as node names, without component indices or complete instance paths. The documented round trip concerns whole objects.
Replays the parent snapshot, restores flatten and replaces members from stored names.
| Item | Type / behavior |
|---|---|
| Returns | None |
snapshot |
Optional[Mapping[str, Any]] · default: None |
**kwargs |
Any · default: — |
Replays the parent snapshot, then resolves member names, restores flatten and replaces membership. A missing name can interrupt the operation after earlier changes have been applied.
Get the members of the ObjectSet.
| Item | Type / behavior |
|---|---|
| Returns | om.MSelectionList |
flatten |
Optional[bool] · default: False |
Clear all members from the ObjectSet.
| Item | Type / behavior |
|---|---|
| Returns | None |
Adds objects to a live set; without a live set, replaces the staged selection.
| Item | Type / behavior |
|---|---|
| Returns | None |
selection_list |
om.MSelectionList | Sequence[MemberLike] · default: — |
Without a live set, successive calls replace the staged selection instead of accumulating it. Create the set before successive additions. MSelectionList conversion falls back to objects; do not assume component selections are preserved.
Add a single member to the ObjectSet.
| Item | Type / behavior |
|---|---|
| Returns | None |
member |
str | om.MObject | om.MObjectHandle | om.MFnDependencyNode | om.MDagPath | om.MFnDagNode · default: — |
Remove members from the ObjectSet.
| Item | Type / behavior |
|---|---|
| Returns | None |
selection_list |
om.MSelectionList | Sequence[MemberLike] · default: — |
Remove a single member from the ObjectSet.
| Item | Type / behavior |
|---|---|
| Returns | None |
member |
str | om.MObject | om.MObjectHandle | om.MFnDependencyNode | om.MDagPath | om.MFnDagNode · default: — |
Check if a member is part of the ObjectSet.
| Item | Type / behavior |
|---|---|
| Returns | bool |
member |
str | om.MObject | om.MObjectHandle | om.MFnDependencyNode | om.MDagPath | om.MFnDagNode · default: — |
DGNode4| Method | Returns | Description |
|---|---|---|
delete |
None |
Disconnects live connections, detaches the wrapper and deletes the node. |
snapshot_svd |
SVDSnapshot |
Captures Source / Value / Destinations for the requested list. |
svd |
SVDView |
Returns a read-only live view of source, value and destinations; it is not a frozen capture. |
clear_attr_cache |
None |
Clears this instance attribute cache; does not delete nodes or clear the global wrapper registry. |
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 | Value / composition |
|---|---|
NODE_TYPE |
'objectSet' |
SPEC_LAYERS |
get_dg_specs_all, get_container_base_specs_all, get_object_set_specs_all |
NODE_REGISTRY and other class attributes not overridden here remain inherited. Exported Snapshot types describe dictionaries; use node.snapshot() to capture state.
| Point | Behavior |
|---|---|
| Identity | A node recreated under the same name is a new Maya object. |
| Creation and geometry | The constructor creates nothing; call create() before live operations. |
| Capture | Snapshots can contain Maya objects; do not assume JSON-ready data or complete geometry reconstruction. |
members |
Before member initialization, the getter can return None despite its annotation. The setter replaces members in two steps (clear, then add), without a rollback transaction. |
add_members |
Without a live set, successive calls replace the staged selection instead of accumulating it. Create the set before successive additions. MSelectionList conversion falls back to objects; do not assume component selections are preserved. |
snapshot |
Members are recorded as node names, without component indices or complete instance paths. The documented round trip concerns whole objects. |
finalize |
Replays the parent snapshot, then resolves member names, restores flatten and replaces membership. A missing name can interrupt the operation after earlier changes have been applied. |
Self-contained Maya Python Script Editor example. In mayapy, initialize maya.standalone before this block. The demonstration creates its own nodes and removes them in finally.
from uuid import uuid4from weSkel.src.core.node.dg.object_set.lib import ObjectSetfrom weSkel.src.core.node.dag.transform.lib import Transform
suffix = uuid4().hex[:8]node = ObjectSet("api_set_" + suffix)member = Transform("api_set_member_" + suffix)try: member.create() node.create() node.add_member(member.mobject) assert node.is_member(member.mobject) assert node.get_members().length() == 1 state = node.snapshot() node.clear_members() assert node.get_members().length() == 0 node.finalize(state) assert node.is_member(member.mobject) node.remove_member(member.mobject) assert not node.is_member(member.mobject) assert member.exists print("ObjectSet: membership and snapshot replay OK")finally: node.delete(snapshot=False) member.delete(snapshot=False)Expected result : ObjectSet: membership and snapshot replay OK.
SDK checkpoint 87c3486. Member inventory and fixture reads checked in Maya 2025.3 and 2026.3; example executed in both versions. The example does not cover every method. Listed limitations remain in source; these checks do not validate the compiled package.