Python API 2.0 Reference
|
Static Public Member Functions | |
def | __new__ () |
def | allocateFlag () |
def | classification () |
def | deallocateAllFlags () |
def | deallocateFlag () |
Static Public Member Functions inherited from OpenMaya.MFnBase | |
def | __new__ () |
Static Public Attributes | |
int | kTimerMetrics = 9 |
int | kTimerTypes = 3 |
Attribute Classes | |
int | kExtensionAttr = 3 |
int | kInvalidAttr = 4 |
int | kLocalDynamicAttr = 1 |
int | kNormalAttr = 2 |
DG Timer States | |
int | kTimerInvalidState = 3 |
int | kTimerOff = 0 |
int | kTimerOn = 1 |
int | kTimerUninitialized = 2 |
DG Timer Metrics | |
int | kTimerMetric_callback = 0 |
int | kTimerMetric_callbackNotViaAPI = 6 |
int | kTimerMetric_callbackViaAPI = 5 |
int | kTimerMetric_compute = 1 |
int | kTimerMetric_computeDuringCallback = 7 |
int | kTimerMetric_computeNotDuringCallback = 8 |
int | kTimerMetric_dirty = 2 |
int | kTimerMetric_draw = 3 |
int | kTimerMetric_fetch = 4 |
DG Timer Types | |
int | kTimerType_count = 2 |
int | kTimerType_inclusive = 1 |
int | kTimerType_self = 0 |
Properties | |
isDefaultNode = property(...) | |
isFromReferencedFile = property(...) | |
isLocked = property(...) | |
isShared = property(...) | |
namespace = property(...) | |
pluginName = property(...) | |
typeId = property(...) | |
typeName = property(...) | |
Function set for operating on dependency nodes. Method resolution order: - MFnDependencyNode - MFnBase - builtins.object
Signature | Parameters | Description |
---|---|---|
MFnDependencyNode() | Default constructor. Returns a new MFnDependencyNode function set with no node attached. | |
MFnDependencyNode(node) | object - MObject | Returns a new MFnDependencyNode function set, attached to the specified Maya node. |
def OpenMaya.MFnDependencyNode.__init__ | ( | ) |
Initialize self. See help(type(self)) for accurate signature.
|
static |
Create and return a new object. See help(type) for accurate signature.
def OpenMaya.MFnDependencyNode.absoluteName | ( | ) |
Returns the absolute name of this node. The absolute name of a node is the full namespace path starting at (and including) the root namespace, down to (and including) the node itself. Regardless of relative name mode, absoluteName() will always return a full namespace path prefixed with a leading colon (the root namespace). If the underlying node is a DAG node, then absoluteName() does not guarantee uniqueness, that is, two dependency nodes could have the same absoluteName(). In cases like this the uniqueName() method will guarantee that the name uniquely identifies the node.
OpenMaya.MFnDependencyNode.addAttribute | ( | ) |
Adds a new dynamic attribute to the node.
Signature: | addAttribute(attribute) |
Parameters: | attribute - MObject |
Returns: | Reference to self. |
Description: | Adds a new dynamic attribute to the node. |
def OpenMaya.MFnDependencyNode.addExternalContentForFileAttr | ( | ) |
Adds content info to the specified table from a file path attribute.
def OpenMaya.MFnDependencyNode.affectsAnimation | ( | ) |
Returns true if the changes to the node may affect animation.
|
static |
Allocates a flag on all nodes for use by the named plugin and returns the flag's index.
Name: | allocateFlag(plugin) |
Parameters: | plugin - string |
Returns: | int |
Description: | Allocates a flag on all nodes for use by the named plugin. Returns the flag's index. Raises a ValueError if there are no unallocated node flags available. |
OpenMaya.MFnDependencyNode.attribute | ( | ) |
Returns an attribute of the node, given either its index or name.
Signature: | attribute(index) |
Parameters: | index - int |
Returns: | MObject |
Description: | Returns the node's index'th attribute, based on the order in which they were added to the node. |
Signature: | attribute(name) |
Parameters: | name - string |
Returns: | MObject |
Description: | Returns the attribute with the given name. |
OpenMaya.MFnDependencyNode.attributeClass | ( | ) |
Returns the class of the specified attribute.
Signature: | attributeClass(attribute) |
Parameters: | attribute - MObject |
Returns: | Attribute Class constant |
Description: | Returns the class of the specified attribute. |
OpenMaya.MFnDependencyNode.attributeCount | ( | ) |
Returns the number of attributes on the node.
Signature: | attributeCount() |
Parameters: | |
Returns: | int |
Description: | Returns the number of attributes on the node. |
OpenMaya.MFnDependencyNode.canBeWritten | ( | ) |
Returns true if the node will be written to file.
Signature: | canBeWritten() |
Parameters: | |
Returns: | bool |
Description: | Returns true if the node will be written to file. |
|
static |
Returns the classification string for the named node type.
Name: | classification(nodeType) |
Parameters: | nodeType - string |
Returns: | string |
Description: | Returns the classification string for the named nodeType. |
OpenMaya.MFnDependencyNode.create | ( | ) |
Creates a new node of the given type.
Signature: | create(typeId, nodeName=None) |
Parameters: | typeId - MTypeId nodeName - string |
Returns: | MObject |
Description: | Creates a new node of the given type, using the nodeName provided, attaches it to the function set and returns it in an MObject. If no nodeName is given the node's type name will be used, followed by a number to ensure uniqueness. |
Signature: | create(typeName, nodeName=None) |
Parameters: | typeName - string nodeName - string |
Returns: | MObject |
Description: | Creates a new node of the given type, using the nodeName provided, attaches it to the function set and returns it in an MObject. If no nodeName is given the node's type name will be used, followed by a number to ensure uniqueness. |
|
static |
Deallocates all node flags which are currently allocated to the named plugin.
Name: | deallocateAllFlags(plugin) |
Parameters: | plugin - string |
Returns: | None |
Description: | Deallocates all node flags which are currently allocated to the named plugin. |
|
static |
Deallocates the specified node flag, which was previously allocated by the named plugin using allocateFlag().
Name: | deallocateFlag(plugin, flag) |
Parameters: | plugin - string flag - int |
Returns: | None |
Description: | Deallocates the specified node flag, which was previously allocated by the named plugin using allocateFlag(). |
OpenMaya.MFnDependencyNode.dgCallbackIds | ( | ) |
Returns DG timing information for a specific callback type, broken down by callbackId.
Signature: | dgCallbackIds(timerType, callbackName) |
Parameters: | timerType - DG Timer Type constant callbackName - string |
Returns: | (MCallbackIdArray, MDoubleArray) |
Description: | Returns a tuple containing an array of callback ids as its first element and an array of doubles as its second element. These represent the callback timer values for the specified timerType and callbackName, separated out per callback ID. |
OpenMaya.MFnDependencyNode.dgCallbacks | ( | ) |
Returns DG timing information broken down by callback type.
Signature: | dgCallbacks(type) |
Parameters: | type - DG Timer Type constant |
Returns: | ([string, ...], MDoubleArray) |
Description: | Returns a tuple containing a list of callback type names as its first element and an array of doubles as its second element. These represent the callback timer values for the specified timer type, grouped by type of callback. |
OpenMaya.MFnDependencyNode.dgTimer | ( | ) |
Returns a specific DG timer metric for a given timer type.
Signature: | dgTimer(metric, type) |
Parameters: | metric - DG Timer Metric constant type - DG Timer Type constant |
Returns: | float |
Description: | Returns the timer value for the given metric and type. |
OpenMaya.MFnDependencyNode.dgTimerOff | ( | ) |
Turns DG timing off for this node.
Signature: | dgTimerOff() |
Parameters: | |
Returns: | Reference to self |
Description: | Turns DG timing off for this node. |
OpenMaya.MFnDependencyNode.dgTimerOn | ( | ) |
Turns DG timing on for this node.
Signature: | dgTimerOn() |
Parameters: | |
Returns: | Reference to self |
Description: | Turns DG timing on for this node. |
OpenMaya.MFnDependencyNode.dgTimerQueryState | ( | ) |
Returns the current DG timer state for this node.
Signature: | dgTimerQueryState() |
Parameters: | |
Returns: | DG Timer State constant |
Description: | Returns the current DG timer state for this node. |
OpenMaya.MFnDependencyNode.dgTimerReset | ( | ) |
Resets all DG timers for this node.
Signature: | dgTimerReset() |
Parameters: | |
Returns: | Reference to self |
Description: | Resets all DG timers for this node. |
OpenMaya.MFnDependencyNode.findAlias | ( | ) |
Returns the attribute which has the given alias.
Signature: | findAlias(alias) |
Parameters: | alias - string |
Returns: | MObject |
Description: | Returns the attribute which has the given alias or MObject::kNullObj if none. |
OpenMaya.MFnDependencyNode.findPlug | ( | ) |
OpenMaya.MFnDependencyNode.getAffectedAttributes | ( | ) |
Returns all of the attributes which are affected by the specified attribute.
Signature: | getAffectedAttributes(attribute) |
Parameters: | attribute - MObject |
Returns: | MObjectArray |
Description: | Returns all of the attributes which are affected by the specified attribute. |
OpenMaya.MFnDependencyNode.getAffectingAttributes | ( | ) |
Returns all of the attributes which affect the specified attribute.
Signature: | getAffectingAttributes(attribute) |
Parameters: | attribute - MObject |
Returns: | MObjectArray |
Description: | Returns all of the attributes which affect the specified attribute. |
OpenMaya.MFnDependencyNode.getAliasAttr | ( | ) |
Returns the node's alias attribute, which is a special attribute used to store information about the node's attribute aliases.
Signature: | getAliasAttr(force) |
Parameters: | force - bool |
Returns: | MObject |
Description: | Returns the node's alias attribute, which is a special attribute used to store information about the node's attribute aliases. |
OpenMaya.MFnDependencyNode.getAliasList | ( | ) |
Returns all of the node's attribute aliases.
Signature: | getAliasList() |
Parameters: | |
Returns: | tuple of tuples of strings |
Description: | Returns all of the node's attribute aliases in a tuple. Each element of the tuple is itself a tuple containing a pair of strings representing the attribute's alias and its real name. |
OpenMaya.MFnDependencyNode.getConnections | ( | ) |
Returns all the plugs which are connected to attributes of this node.
Signature: | getConnections() |
Parameters: | |
Returns: | MPlugArray |
Description: | Returns all the plugs which are connected to attributes of this node. |
def OpenMaya.MFnDependencyNode.getExternalContent | ( | ) |
Gets the external content (files) that this node depends on.
OpenMaya.MFnDependencyNode.hasAttribute | ( | ) |
Returns True if the node has an attribute with the given name.
Signature: | hasAttribute(name) |
Parameters: | name - string |
Returns: | bool |
Description: | Returns True if the node has an attribute with the given name. |
OpenMaya.MFnDependencyNode.hasUniqueName | ( | ) |
Returns True if the node's name is unique.
Signature: | hasUniqueName() |
Parameters: | |
Returns: | bool |
Description: | Returns True if the node's name is unique. |
OpenMaya.MFnDependencyNode.isFlagSet | ( | ) |
Returns the state of the specified node flag.
Signature: | isFlagSet(flag) |
Parameters: | flag - int |
Returns: | bool |
Description: | Returns the state of the specified node flag, which must previously have been allocated by a call to allocateFlag(). |
OpenMaya.MFnDependencyNode.isNewAttribute | ( | ) |
Returns True if the specified attribute was added in the current scene, and not by by one of its referenced files.
Signature: | isNewAttribute(attribute) |
Parameters: | attribute - MObject |
Returns: | bool |
Description: | Returns True if the specified attribute was added in the current scene, and not by by one of its referenced files. |
def OpenMaya.MFnDependencyNode.isTrackingEdits | ( | ) |
Returns True if the node is referenced or in an assembly that is tracking edits.
OpenMaya.MFnDependencyNode.name | ( | ) |
Returns the node's name.
Signature: | name() |
Parameters: | |
Returns: | string |
Description: | Returns the node's name. |
OpenMaya.MFnDependencyNode.plugsAlias | ( | ) |
Returns the alias for a plug's attribute.
Signature: | plugsAlias(plug) |
Parameters: | plug - MPlug |
Returns: | string |
Description: | Returns the alias for the plug's attribute or the empty string if that attribute has no alias. |
OpenMaya.MFnDependencyNode.removeAttribute | ( | ) |
Removes a dynamic attribute from the node.
Signature: | removeAttribute(attribute) |
Parameters: | attribute - MObject |
Returns: | Reference to self. |
Description: | Removes a dynamic attribute from the node. |
OpenMaya.MFnDependencyNode.reorderedAttribute | ( | ) |
Returns one of the node's attribute, based on the order in which they are written to file.
Signature: | reorderedAttribute(index) |
Parameters: | index - int |
Returns: | MObject |
Description: | Returns the node's index'th attribute, based on the order in which they are written to file. |
def OpenMaya.MFnDependencyNode.setAffectsAnimation | ( | ) |
Specifies that modifications to a node could potentially affect the animation.
OpenMaya.MFnDependencyNode.setAlias | ( | ) |
Adds or removes an attribute alias.
Signature: | setAlias(alias, attrName, plug, add=True) |
Parameters: | alias - string attrName - string plug - MPlug add - bool |
Returns: | bool |
Description: | Adds or removes an attribute alias. Returns False if the alias to be added already exists, or if the alias to be removed does not exist. |
OpenMaya.MFnDependencyNode.setDoNotWrite | ( | ) |
Used to prevent the node from being written to file.
Signature: | setDoNotWrite(flag) |
Parameters: | flag - bool |
Returns: | Reference to self. |
Description: | Used to prevent the node from being written to file. |
def OpenMaya.MFnDependencyNode.setExternalContent | ( | ) |
Changes the location of external content.
def OpenMaya.MFnDependencyNode.setExternalContentForFileAttr | ( | ) |
Sets content info in the specified attribute from the table.
OpenMaya.MFnDependencyNode.setFlag | ( | ) |
Sets the state of the specified node flag.
Signature: | setFlag(flag, state) |
Parameters: | flag - int state - bool |
Returns: | Reference to self |
Description: | Sets the state of the specified node flag, which must previously have been allocated by a call to allocateFlag(). |
OpenMaya.MFnDependencyNode.setName | ( | ) |
Sets the node's name.
Signature: | setName(name) |
Parameters: | name - string |
Returns: | string |
Description: | Sets the node's name. If there is a conflict with another node the name will be modified to make it unique. The name actually used is returned. |
def OpenMaya.MFnDependencyNode.setUuid | ( | ) |
Sets the node's UUID.
def OpenMaya.MFnDependencyNode.uniqueName | ( | ) |
For a DAG node, the unique name of a node is the full namespace path starting at (and including) the root namespace, down to (and including) the node itself. For a non-DAG node, the uniqueName is just its name.
OpenMaya.MFnDependencyNode.userNode | ( | ) |
Returns the MPxNode object for a plugin node.
Signature: | userNode() |
Parameters: | |
Returns: | MPxNode or None |
Description: | If the node is a plug-in node, its proxy object is returned, otherwise None is returned. |
def OpenMaya.MFnDependencyNode.uuid | ( | ) |
Returns the node's UUID.
|
static |
Name: | kExtensionAttr |
Type: | int |
Description: | Dynamically added to all nodes of a given type, plus derived types. |
|
static |
Name: | kInvalidAttr |
Type: | int |
Description: | None of the above. |
|
static |
Name: | kLocalDynamicAttr |
Type: | int |
Description: | Dynamically added to a specific node, after its creation. |
|
static |
Name: | kNormalAttr |
Type: | int |
Description: | Part of node's definition. |
|
static |
Name: | kTimerInvalidState |
Type: | int |
Description: |
|
static |
Name: | kTimerMetric_callback |
Type: | int |
Description: | Time spent within node callbacks for this node. |
|
static |
Name: | kTimerMetric_callbackNotViaAPI |
Type: | int |
Description: | Time spent in callbacks not registered through the API (i.e internal Maya callbacks). (NOT IMPLEMENTED) |
|
static |
Name: | kTimerMetric_callbackViaAPI |
Type: | int |
Description: | Time spent in callbacks which were registered through the API. (NOT IMPLEMENTED) |
|
static |
Name: | kTimerMetric_compute |
Type: | int |
Description: | Time spent within the compute method for this node. |
|
static |
Name: | kTimerMetric_computeDuringCallback |
Type: | int |
Description: | Time spent in this node's compute while executing node callbacks on any node. |
|
static |
Name: | kTimerMetric_computeNotDuringCallback |
Type: | int |
Description: | Time spent in this nodes compute when not executing any node callbacks on any nodes. |
|
static |
Name: | kTimerMetric_dirty |
Type: | int |
Description: | Time spent propogating dirty messages from this node. |
|
static |
Name: | kTimerMetric_draw |
Type: | int |
Description: | Time spent drawing this node. |
|
static |
Name: | kTimerMetric_fetch |
Type: | int |
Description: | Time spent fetching data from plugs. |
|
static |
Name: | kTimerOff |
Type: | int |
Description: |
|
static |
Name: | kTimerOn |
Type: | int |
Description: |
|
static |
Name: | kTimerType_count |
Type: | int |
Description: | The number of operations that occurred. |
|
static |
Name: | kTimerType_inclusive |
Type: | int |
Description: | Time spent performing an operation including all time spent by child operations. |
|
static |
Name: | kTimerType_self |
Type: | int |
Description: | Time spent performing an operation, not including any time spent by child operations. |
|
static |
Name: | kTimerUninitialized |
Type: | int |
Description: |
|
static |
True if this is a default node, created automatically by Maya.
Name: | isDefaultNode |
Type: | bool |
Access: | R |
Description: | True if node is one of Maya's default nodes. |
|
static |
True if the node is from a referenced file, False if the node is part of the main scene.
Name: | isFromReferencedFile |
Type: | bool |
Access: | R |
Description: | True if node is from a referenced file. |
|
static |
True if the node is locked against changes.
Name: | isLocked |
Type: | bool |
Access: | RW |
Description: | True if node is locked against changes. |
|
static |
True if the node is shared.
Name: | isShared |
Type: | bool |
Access: | R |
Description: | True if node is shared. |
|
static |
Name of the namespace which contains the node.
Name: | namespace |
Type: | string |
Access: | R |
Description: | Namespace in which node resides. |
|
static |
Name of the plugin which registered the node type, if any.
Name: | pluginName |
Type: | string |
Access: | R |
Description: | Name of plugin which supplies the node type. |
|
static |
MTypeId for the node's type.
Name: | typeId |
Type: | MTypeId |
Access: | R |
Description: | Node's type id. |
|
static |
Name of the node's type.
Name: | typeName |
Type: | string |
Access: | R |
Description: | Node's type name. |