Contains implementations of animation specific types and utilities
Epydoc: mrv.maya.nt.anim.AnimCurve
Bases: mrv.maya.nt.DependNode
Type representing a maya animation cuvrve, fixes existing MFnAnimCurve methods and provides new convenience methods as well
Add the given attribute to the node as local dynamic attribute
| Parameter: | attr – MObject of attribute or Attribute instance as retrieved from a plug |
|---|---|
| Returns: | plug to the newly added attribute |
| Note: | This method is explicitly not undoable as attributes are being deleted in memory right in the moment they are being removed, thus they cannot reside on the undo queue |
| Returns: | item with separator added to it ( just once ) |
|---|---|
| Note: | operates best on strings |
| Parameters: |
|
Add ourselves to the given set
| Note: | method is undoable |
|---|---|
| See: | sets.ObjectSet |
| Returns: | the MObject attached to this Node |
|---|
| Returns: | the MFn Type id of the wrapped object |
|---|
| Returns: | name of this instance |
|---|---|
| Note: | it is mainly for compatability with dagNodes which need this method in order to return the name of their leaf node |
| Returns: | list of intermediate children of path, [ child1 , child2 ] |
|---|---|
| Parameter: | predicate – return True to include x in result |
| Note: | the child objects returned are supposed to be valid paths, not just relative paths |
| Returns: | list of all children of path, [ child1 , child2 ] |
|---|---|
| Parameters: |
|
| Note: | the child objects returned are supposed to be valid paths, not just relative paths |
| Returns: | list of object set compatible Nodes having self as member |
|---|---|
| Parameter: | setFilter – tuple(apiType, use_exact_type) - the combination of the desired api type and the exact type flag allow precise control whether you which to get only renderable shading engines, only objectfSets (tuple[1] = True), or all objects supporting the given object type. Its preset to only return shading engines |
| Note: | the returned sets order is defined by the order connections to instObjGroups |
| Note: | only sets will be returned that have the whole object as member, thus you will not see sets having component assignments like per-compoent shader assignments or deformer sets |
| Returns: | MPlugArray of connected plugs |
|---|
Copy the data from other into self as good as possible Only copy the data that is unique to your specific class - the data of other classes will be taken care of by them !
| Note: | you must support args and kwargs if one of your iDuplicate bases does |
|---|
Copy the values of ourselves onto the given instance which must be an instance of our class to be compatible. Only the common classes will be copied to instance
| Returns: | altered instance |
|---|---|
| Note: | instance will be altered during the process |
Create and Initialize an instance of self.__class__( ... ) based on your own data
| Returns: | new instance of self |
|---|---|
| Note: | using self.__class__ instead of an explicit class allows derived classes that do not have anything to duplicate just to use your implementeation |
| Note: | you must support args and kwargs if one of your iDuplicate bases does |
Delete this node
| Note: | if the undo queue is enabled, the object becomes invalid, but stays alive until it drops off the queue |
|---|---|
| Note: | if you want to delete many nodes, its more efficient to delete them using the global delete method |
| Returns: | list of attributes that given attribute affects or that the given attribute is affected by if the attribute turns dirty. |
|---|---|
| Parameters: |
|
| Note: | see also MPlug.affectedByPlugs |
| Note: | USING MEL: as api command and mObject array always crashed on me ... don’t know :( |
Duplicate our node and return a wrapped version to it
| Parameters: |
|
|---|---|
| Note: | the copyTo method may not have not-undoable side-effects to be a proper implementation |
| Note: | undo could be implemented for dg nodes - but for reasons of consistency, its disabled here - who knows how much it will crap out after a while as duplicate is not undoable (mel command) - it never really worked to undo a mel command from within python, executed using a dgmodifier - unfortunately it does not return any result making it hard to find the newly duplicated object ! |
| Returns: | list-compatible object containing animation curves attached to the nodes in the given object. |
|---|---|
| Parameters: |
|
| Returns: | list of all function set classes this node supports, most derived function set comes first |
|---|
| Returns: | tuple(x,y) tuple containing the x and y positions of the tangent at index:
|
|---|---|
| Parameters: |
|
| Returns: | tuple(MAngle, weight) tuple containing the angle and weight of the tangent. |
|---|---|
| Note: | See getTangent for all other parameters |
| Returns: | True if our object supports the given function set type |
|---|
| Returns: | True if the object exists in memory |
|---|---|
| Note: | objects on the undo queue are alive, but NOT valid |
| Returns: | True if self is part of setnode |
|---|---|
| Note: | method is undoable |
| See: | sets.ObjectSet |
| Returns: | True if self is a part of other, and thus can be found in other |
|---|---|
| Note: | operates on strings only |
| Returns: | True if this path is the root of the DAG |
|---|
| Returns: | True other starts with self |
|---|---|
| Note: | operates on strings |
| Note: | we assume other has the same type as self, thus the same separator |
| Returns: | True if the object exists in the scene |
|---|---|
| Note: | objects on the undo queue are NOT valid, but alive |
| Returns: | generator retrieving all parents up to the root |
|---|---|
| Parameter: | predicate – returns True for all x that you want to be returned |
| Returns: | the MObject attached to this Node |
|---|
| Returns: | parent of this path, ‘/hello/world’ -> ‘/hello’ or None if this path is the dag’s root |
|---|
| Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
|---|
| Returns: | name (str) of file this node is coming from - it could contain a copy number as {x} |
|---|---|
| Note: | will raise if the node is not referenced, use isReferenced to figure that out |
Remove the given attribute from the node
| Parameter: | attr – see addAttribute |
|---|
remove ourselves to the given set
| Note: | method is undoable |
|---|---|
| See: | sets.ObjectSet |
Rename this node to newname
| Parameters: |
|
|---|---|
| Returns: | renamed node which is the node itself |
| Note: | for safety reasons, this node is dagnode aware and uses a dag modifier for them ! |
| Returns: | the root of the DAG - it has no further parents |
|---|
Lock or unloack this node
| Parameter: | state – if True, the node is locked. Locked nodes cannot be deleted, renamed or reparented |
|---|---|
| Note: | you can query the lock state with isLocked |
| Returns: | self after being moved to the given namespace. This will effectively rename the object. |
|---|---|
| Parameters: |
|
| Returns: | list of object set compatible Nodes having self as member |
|---|---|
| Parameter: | setFilter – tuple(apiType, use_exact_type) - the combination of the desired api type and the exact type flag allow precise control whether you which to get only renderable shading engines, only objectfSets (tuple[1] = True), or all objects supporting the given object type. Its preset to only return shading engines |
| Note: | the returned sets order is defined by the order connections to instObjGroups |
| Note: | only sets will be returned that have the whole object as member, thus you will not see sets having component assignments like per-compoent shader assignments or deformer sets |
| Returns: | True if this instance supports the interface of the given type |
|---|---|
| Parameter: | interface_type – Type of the interface you require this instance to support |
| Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |