Epydoc: mrv.maya.automation.qa
Specialization of workflow to allow checks to be natively implemented in MEL
Epydoc: mrv.maya.automation.qa
Bases: mrv.util.Singleton
This class is a necessity for calling mel scripts from python. It allows scripts to be called in a cleaner fashion, by automatically formatting python arguments into a string which is executed via maya.mel.eval().
Note: | originated from pymel, added customizations |
---|
Call a mel script , very simpilar to Mel.myscript( args )
Todo: | more docs |
---|
Epydoc: mrv.maya.automation.qa
Bases: mrv.dge.plug
Defines a test suitable to be run and computed by a QAProcessBase It’s nothing more than a convenience class as the actual information is held by the respective QACheckAttribute. All non-plug calls are passed on to the underlying attribute, allowing it to be treated like one
Returns: | tuple containing affected plugs ( plugs that are affected by our value ) |
---|
Returns: | tuple containing plugs that affect us ( plugs affecting our value ) |
---|
Returns: | name of plug |
---|
Returns: | True if this is an input plug that will never cause computations |
---|
Returns: | True if this is an output plug that can trigger computations |
---|
Epydoc: mrv.maya.automation.qa
Bases: mrv.dge.Attribute
The Test Attribute represents an interface to a specific test as implemented by the parent QAProcessBase. The QA Attribute returns specialized quality assurance results and provides additional information about the respective test
Note: | as this class holds meta information about the respective test ( see QACheck ) user interfaces may use it to adjust it’s display |
---|---|
Note: | this class depends on unknown mel implementations - on error we abort but do not throw as this would cause class creation to fail and leave the whole qa system unusable |
Compute affinity for otherattr.
Returns: | rating from 0 to 255 defining how good the attribtues match each other in general - how good can we store values of otherattr ? Thus this comparison is directed. |
---|---|
Note: | for checking connections, use connectionAffinity |
Compute value’s compatability rate
Returns: | value between 0 and 255, 0 means no compatability, 255 a perfect match. if larger than 0, the plug can hold the value ( assumed the flags are set correctly ). |
---|
Compute connection affinity for given destination attribute
Returns: | rating from 0 to 255 defining the quality of the connection to otherplug. an affinity of 0 mean connection is not possible, 255 mean the connection is perfectly suited. The connection is a directed one from self -> otherplug |
---|
Returns: | default value stored for this attribute, or raise |
---|---|
Note: | handles dynamic defaults, so you should not directly access the default member variable |
Raises MissingDefaultValueError: | |
if attribute does not have a default value | |
Raises TypeError: | |
if value returned by dynamic attribute has incorrect type |
Epydoc: mrv.maya.automation.qa
Bases: object
Wrapper class declaring test results as a type that provides a simple interface to retrieve the test results
Note: | test results are only reqtrieved by QACheckAttribute plugs |
---|
Returns: | ( list( Item, ... ) list of failed items being items that could not be fixed and are not yet in the desired state |
---|
Returns: | list( Item , ... ) list of items ( the exact type may differ depending on the actual test ) which have been fixed so they represent the desired state |
---|
Returns: | True if the test result is empty, and thus resembles a null value |
---|
Returns: | True if the check is successful, and False if there are at least some failed objects |
---|
Epydoc: mrv.maya.automation.qa.QAMELCheck
Bases: mrv.automation.qa.QACheck
Specialized version of the QACheck allowing to use our own MEL attribute contianiing more information
Returns: | tuple containing affected plugs ( plugs that are affected by our value ) |
---|
Returns: | tuple containing plugs that affect us ( plugs affecting our value ) |
---|
Returns: | name of plug |
---|
Returns: | True if this is an input plug that will never cause computations |
---|
Returns: | True if this is an output plug that can trigger computations |
---|
Epydoc: mrv.maya.automation.qa.QAMELCheckAttribute
Bases: mrv.automation.qa.QACheckAttribute
Attribute identifying a MEL check carrying additional mel specific attributes
Compute affinity for otherattr.
Returns: | rating from 0 to 255 defining how good the attribtues match each other in general - how good can we store values of otherattr ? Thus this comparison is directed. |
---|---|
Note: | for checking connections, use connectionAffinity |
Compute value’s compatability rate
Returns: | value between 0 and 255, 0 means no compatability, 255 a perfect match. if larger than 0, the plug can hold the value ( assumed the flags are set correctly ). |
---|
Compute connection affinity for given destination attribute
Returns: | rating from 0 to 255 defining the quality of the connection to otherplug. an affinity of 0 mean connection is not possible, 255 mean the connection is perfectly suited. The connection is a directed one from self -> otherplug |
---|
Returns: | default value stored for this attribute, or raise |
---|---|
Note: | handles dynamic defaults, so you should not directly access the default member variable |
Raises MissingDefaultValueError: | |
if attribute does not have a default value | |
Raises TypeError: | |
if value returned by dynamic attribute has incorrect type |
Epydoc: mrv.maya.automation.qa.QAMELMixin
Bases: object
Base class allowing to process MEL baesd plugs as created by our metaclass
Note: | this class assumes it is used on a process |
---|
The following variables MUST be used to setup this class once you have derived from it:
- mel_index_proc:
- produdure name with signature func( ) returning string array in following format:
[n*3+0] = checkname : the name of the check, use CamelCase names or names_with_underscore The checkname is also used as id to identify the check lateron [n*3+1] = description: Single sentence desciption of the check targeted at the end user [n*3+2] = can_fix: Boolean value indicating whether the check can also fix the issue
- mel_check_proc:
- procedure called to actually process the given check, signature is:
func( check_name, should_fix ) returning list of strings as follows:
[0] = x number of fixed items [1] = header [1:1+x] = x fixed items [2+x:n] = n invalid items
items are either objects or in general anything you check for. The check is considered to be failed if there is at least one invalid item.
If you fixed items, all previously failed items should now be returned as valid items
Called to handle the given check in the given mode
Raises RuntimeError: | |
---|---|
If MEL throws an error | |
Returns: | QACheckResult of the result generated by MEL |
Returns: | True if the given check plug is implemented in MEL and can be handled there accordingly |
---|
Returns: | list all checks ( Plugs ) available on this class that are implemented in MEL |
---|
Returns: | list of MEL checks ( plugs ) representing checks defined by MEL |
---|---|
Parameter: | predicate – only return plug if predicate( item ) yield True |
Epydoc: mrv.maya.automation.qa.QAMetaMel
Bases: mrv.dge._NodeBaseCheckMeta
Metaclass allowing to create plugs based on a MEL implementation, allowing to decide whether checks are Python or MEL implemented, but still running natively in python