#include <string.h>
#include <maya/MIOStream.h>
#include <math.h>
#include <maya/MPxCameraSet.h>
#include <maya/MFnCompoundAttribute.h>
#include <maya/MFnEnumAttribute.h>
#include <maya/MFnPlugin.h>
#include <maya/MString.h>
#include <maya/MTypeId.h>
#include <maya/MPlug.h>
#include "exCameraSet.h"
#include "testExCameraSetCmd.h"
MTypeId exCameraSet::id( 0x80024 );
MObject exCameraSet::layerTypeAttr;
exCameraSet::exCameraSet() {}
exCameraSet::~exCameraSet() {}
void* exCameraSet::creator()
{
return new exCameraSet();
}
{
layerTypeAttr = enumAttr.
create(
"layerType",
"lt", 0, &status );
if( !status ) {
status.
perror(
"ERROR creating layerType enum attribute");
return status;
}
}
MStatus exCameraSet::setLayerType(
unsigned int index,
int layerType )
{
status = getLayerTypePlug(index, layerTypePlug);
return status;
return layerTypePlug.
setValue(layerType);
}
MStatus exCameraSet::getLayerType(
unsigned int index,
int & layerType )
const
{
status = getLayerTypePlug(index, layerTypePlug);
return status;
return layerTypePlug.
getValue(layerType);
}
MStatus exCameraSet::getLayerTypePlug(
unsigned int index,
MPlug &layerTypePlug)
const
{
MPlug enumPlug(thisMObject(), layerTypeAttr);
return status;
}
{
MFnPlugin plugin( obj, PLUGIN_COMPANY,
"7.0",
"Any");
status = plugin.registerNode( "exCameraSet", exCameraSet::id, exCameraSet::creator,
if (!status) {
status.
perror(
"registerNode");
return status;
}
status = plugin.registerCommand( kCmdName, testExCameraSetCmd::creator);
if (!status) {
status.
perror(
"registerCommand");
return status;
}
return status;
}
{
status = plugin.deregisterNode( exCameraSet::id );
if (!status) {
status.
perror(
"deregisterNode");
return status;
}
status = plugin.deregisterCommand( kCmdName );
if (!status) {
status.
perror(
"deregisterCommand");
return status;
}
return status;
}