OpenMaya.MObject

bnFind DG node iterator.
bnGet Retrieve a single DG node.
__hash__ Hash value that can be relied on.

classmethod MObject.bnFind(pattern=None, fnType=maya.OpenMaya.MFn.kInvalid)[source]

DG node iterator.

Categories: foundation.

Parameters:
  • pattern (str) – Full name pattern of the DG nodes to match. Wildcards are allowed.
  • fnType (maya.OpenMaya.MFn.Type) – Function set type to match.
Yields:

maya.OpenMaya.MObject – The DG nodes found.


classmethod MObject.bnGet(pattern=None, fnType=maya.OpenMaya.MFn.kInvalid)[source]

Retrieve a single DG node.

Categories: foundation.

Parameters:
  • pattern (str) – Full name pattern of the DG node to match. Wildcards are allowed.
  • fnType (maya.OpenMaya.MFn.Type) – Function set type to match.
Returns:

The DG node found. If none or many were found, None is returned.

Return type:

maya.OpenMaya.MObject


MObject.__hash__()[source]

Hash value that can be relied on.

This is required because the original method returns different values for multiple instances pointing to a same object, thus making the MObject object not usable with hash-based containers such as dictionaries and sets.

Categories: fix.

Returns:The hash value representing this object.
Return type:int