#include <NodePaletteModelUpdater.h>
Public Member Functions | |
NodePaletteModelUpdater (AnimGraphPlugin *plugin) | |
GraphCanvas::NodePaletteTreeItem * | GetRootItem () |
void | InitForNode (EMotionFX::AnimGraphNode *focusNode) |
Rebuild the list of available/enabled nodes when a given node is focused. | |
This class builds a hierarchy of GraphCanvas::NodePaletteTreeItem nodes that represent nodes that can be added to the anim graph when a given node is focused. They will be grouped into EMotionFX node categories.
On initialization and on every change of focused anim graph node you need to call InitForNode. Without it, you'll get only empty category nodes.
Root node returned by GetRootItem() is typically passed in a config for GraphCanvas::NodePaletteWidget setup. Object of this class should live no longer than the widget because the widget takes the ownership of the root node and the nodes in this class will become dangling pointers if the wigdet is destroyed.