#include <maya/MFnPlugin.h>
#include <maya/MStatus.h>

#include "facialPerformanceNode.h"

// Called when the plugin is loaded
MStatus initializePlugin(MObject obj)
{
    MStatus status;
    MFnPlugin plugin(obj, "Video2ARKit", "1.0", "Any");

    status = plugin.registerNode(
        "facialPerformanceNode",
        FacialPerformanceNode::id,
        FacialPerformanceNode::creator,
        FacialPerformanceNode::initialize
    );

    if (!status) {
        status.perror("Failed to register facialPerformanceNode");
    }

    return status;
}

// Called when the plugin is unloaded
MStatus uninitializePlugin(MObject obj)
{
    MStatus status;
    MFnPlugin plugin(obj);

    status = plugin.deregisterNode(FacialPerformanceNode::id);

    if (!status) {
        status.perror("Failed to deregister facialPerformanceNode");
    }

    return status;
}
