C++ API Reference
|
Introduced in 2020.0 More...
#include <MNodeCacheDisablingInfoHelper.h>
Public Types | |
enum | ConnectionTestFlag { kTestDirtyPlug, kTestHierarchy, kTestPlug, kLastConnectionTest, kTestDefaultValue = kTestDirtyPlug } |
Defines the connection test that can be done on animated attributes. More... | |
Static Public Member Functions | |
static void | setUnsafeNode (MNodeCacheDisablingInfo &disablingInfo, const MEvaluationNode &node, const MString *nodeCategory=NULL) |
Helper to set the reason and mitigation for an unsafe node. More... | |
static void | setUnsafeValue (MNodeCacheDisablingInfo &disablingInfo, const MEvaluationNode &node, const MObject &attribute, const MString &attributeValue, const MString &supportedValue, const MString *nodeCategory=NULL) |
Helper to set the reason and mitigation for an unsafe value on a node's attribute. More... | |
static bool | testAnimatedAttribute (MNodeCacheDisablingInfo *disablingInfo, MObjectArray &monitoredAttributes, const MEvaluationNode &node, const MPlug &plug, ConnectionTestFlag connectionTest=kTestDefaultValue, const MString *nodeCategory=NULL, MStatus *ReturnStatus=NULL) |
Helper to set the reason and mitigation on a node with a conditionally supported attribute if it is animated. More... | |
static bool | testBooleanAttribute (MNodeCacheDisablingInfo *disablingInfo, MObjectArray &monitoredAttributes, const MEvaluationNode &node, const MObject &attribute, bool supportedValue, ConnectionTestFlag connectionTest=kTestDefaultValue, const MString *nodeCategory=NULL, MStatus *ReturnStatus=NULL) |
Helper to set the reason and mitigation on a node with a conditionally supported boolean attribute. More... | |
static bool | testEnumAttribute (MNodeCacheDisablingInfo *disablingInfo, MObjectArray &monitoredAttributes, const MEvaluationNode &node, const MObject &attribute, const short supportedValues[], int supportedValuesCount, ConnectionTestFlag connectionTest=kTestDefaultValue, const MString *nodeCategory=NULL, MStatus *ReturnStatus=NULL) |
Helper to set the reason and mitigation on a node with a conditionally supported enum attribute. More... | |
Introduced in 2020.0
Provides helpers for MNodeCacheDisablingInfo
enum ConnectionTestFlag |
Defines the connection test that can be done on animated attributes.
|
static |
Helper to set the reason and mitigation for an unsafe node.
This method is a helper for derived clases implementing getCacheSetup().
It sets up a proper message and mitigation for an unsupported node.
[out] | disablingInfo | The disabling info to set. |
[in] | node | The evaluation node associated with the unsupported node. |
[in] | nodeCategory | A group name to use in the reported messages, or a null pointer or an empty string to only use the node name. |
|
static |
Helper to set the reason and mitigation for an unsafe value on a node's attribute.
This method is a helper for derived clases implementing getCacheSetup().
It sets up a proper message and mitigation for an unsupported value for an attribute on a node.
[out] | disablingInfo | The disabling info to set. |
[in] | node | The evaluation node associated with the unsupported node. |
[in] | attribute | The unsafe attribute. |
[in] | attributeValue | A string describing the current value of the attribute. |
[in] | supportedValue | A string describing the supported value of the attribute. |
[in] | nodeCategory | A group name to use in the reported messages, or a null pointer or an empty string to only use the node name. |
|
static |
Helper to set the reason and mitigation on a node with a conditionally supported attribute if it is animated.
This method is a helper for derived classes implementing getCacheSetup().
It is meant for attributes that can have a value that would prevent Cached Playback support. It checks that an attribute is animated, and therefore could take the wrong value. If the attribute is animated, it will populate the disabling info with the proper data. Otherwise, it will be added to the list of attributes to monitor.
An additional test can be performed to determine whether or not an attribute is animated. By default, the only test being performed is whether or not the attribute is part of the dirty plugs list. However, in a situation where the attribute is part of a compound structure, it might be useful to perform additional tests. For instance, if a sibling of the target attribute is animated, the whole compound, including the target attribute, will be considered animated as part of the dirty plugs list. A more thorough test can be performed to determine if the attribute, or any of its parents, is the destination of a connection. Depending on the connection setup, this might be enough to known that the attribute is not animated. The connectionTest parameter controls what extra test can be performed. By default, no extra test is performed and the animated status is determined from the dirty plugs list.
Note that if the attribute is animated, it will not be added to the list of attributes to monitor, since its value is expected to change over time without user manipulation.
Note that this method cannot be used on attributes in a complex hierarchy, such as multi attributes or children of multi attributes.
[out] | disablingInfo | The disabling info to set, or nullptr to discard reason and mitigation messages. |
[out] | monitoredAttributes | Attributes that influences if caching is supported. |
[in] | node | Evaluation node associated with the node being tested. |
[in] | plug | Plug to the attribute to be tested. |
[in] | connectionTest | An additional test to perform to determine if the attribute is animated. |
[in] | nodeCategory | A group name to use in the reported messages, or a null pointer or an empty string to only use the node name. |
[out] | ReturnStatus | Status code. |
|
static |
Helper to set the reason and mitigation on a node with a conditionally supported boolean attribute.
This method is a helper for derived classes implementing getCacheSetup().
It checks whether the attribute on a node is not animated and has the right supported value.
Note that this method calls testAnimatedAttribute() so it has the same requirements.
Note that this method works only for boolean attributes, and should not be called with a disabling info object that is already disabled.
[out] | disablingInfo | The disabling info to set, or nullptr to discard reason and mitigation messages. |
[out] | monitoredAttributes | Attributes that influences if caching is supported. |
[in] | node | Evaluation node associated with the node being tested. |
[in] | attribute | Attribute to be tested. |
[in] | supportedValue | Value needed for Cached Playback to be supported. |
[in] | connectionTest | An additional test to perform to determine if the attribute is animated. |
[in] | nodeCategory | A group name to use in the reported messages, or a null pointer or an empty string to only use the node name. |
[out] | ReturnStatus | Status code. |
|
static |
Helper to set the reason and mitigation on a node with a conditionally supported enum attribute.
This method is a helper for derived classes implementing getCacheSetup().
NO SCRIPT SUPPORT
It checks whether the attribute on a node is not animated and has the right supported value.
Note that this method calls testAnimatedAttribute() so it has the same requirements.
Note that this method works only for enum attributes, and should not be called with a disabling info object that is already disabled.
[out] | disablingInfo | The disabling info to set, or nullptr to discard reason and mitigation messages. |
[out] | monitoredAttributes | Attributes that influences if caching is supported. |
[in] | node | Evaluation node associated with the node being tested. |
[in] | attribute | Attribute to be tested. |
[in] | supportedValues | Values needed for Cached Playback to be supported. |
[in] | supportedValuesCount | Number of values in supportedValues. |
[in] | connectionTest | An additional test to perform to determine if the attribute is animated. |
[in] | nodeCategory | A group name to use in the reported messages, or a null pointer or an empty string to only use the node name. |
[out] | ReturnStatus | Status code. |