C++ API Reference
MCacheSchema Class Reference

Introduced in 2020.0 More...

#include <MCacheSchema.h>

Public Member Functions

const MCacheSchemaAttributesRangeattributes () const
 The attributes that are expected to be cached. More...
 
void reset ()
 Deprecated in 2022.0 More...
 
MStatus add (const MObject &)
 Force the attribute to be cached. More...
 

Detailed Description

Introduced in 2020.0

2020.0:
Introduced in this version.

Defines a node's cached data when participant EM Cached Playback Can be used to query or modify the attributes being cached

Warning
Do not store pointer or reference to this object
Users cannot construct or destroy this Maya object
Examples:
footPrintNode_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, and simplePhysicsEngine/simplePhysicsEngine.cpp.

Member Function Documentation

const MCacheSchemaAttributesRange& attributes ( ) const
inline

The attributes that are expected to be cached.

Warning
This list may differ from what Maya will cache in the frame-evaluation-time. Attributes skipped at frame-pre-evaluation time with `MEvaluationNode::skipEvaluation` will not be cached.
Returns
A forward range of MObject attributes
void reset ( )

Deprecated in 2022.0

Reset this schema to the minimal.

Deprecated:
This function is deprecated, see warning.
2022.0:
Deprecated in this version.
Warning
Resetting the cache schema from a parent class may cause Maya to crash
  • If the schema is being configured for Evaluation Cache, attributes() will only contain attributes required by downstream nodes or viewport
  • If the schema is being configured for Viewport Cache (hardware or software), attributes() will be empty
MStatus add ( const MObject attribute)

Force the attribute to be cached.

This method allows you to cache input attributes or other animated attributes that are not fully understood by EM.

Parameters
[in]attributeattribute to cache
Returns
Status code
Status Codes:
  • MS::kSuccess Operation successful
  • MS::kInvalidParameter Attribute is invalid
Examples:
footPrintNode_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, and simplePhysicsEngine/simplePhysicsEngine.cpp.

The documentation for this class was generated from the following files: