#include "narrowPolyViewerCmd.h"
#include <maya/MItDag.h>
#include <maya/MGlobal.h>
#include <maya/MSyntax.h>
#include <maya/MArgParser.h>
#include <maya/MArgList.h>
#include <maya/MSelectionList.h>
#include <maya/MFnCamera.h>
#include <maya/MIOStream.h>
narrowPolyViewerCmd::narrowPolyViewerCmd()
{
}
narrowPolyViewerCmd::~narrowPolyViewerCmd()
{
}
void* narrowPolyViewerCmd::creator()
{
return new narrowPolyViewerCmd();
}
MStatus narrowPolyViewerCmd::appendSyntax()
{
MSyntax theSyntax = syntax(&ReturnStatus);
return ReturnStatus;
}
kInitFlagLong);
kResultsFlagLong);
kClearFlagLong);
kToleranceFlagLong,
return ReturnStatus;
}
MStatus narrowPolyViewerCmd::doEditFlags()
{
if (NULL == user3dModelView) {
}
if (user3dModelView->
viewType() !=
"narrowPolyViewer") {
}
narrowPolyViewer *mpView = (narrowPolyViewer *)user3dModelView;
return initTests(*mpView);
}
else if (argData.
isFlagSet(kResultsFlag)) {
return testResults(*mpView);
return clearResults(*mpView);
}
else if (argData.
isFlagSet(kToleranceFlag)) {
double tol;
mpView->tol = tol;
mpView->refresh(true, true);
} else {
}
return ReturnStatus;
}
MStatus narrowPolyViewerCmd::doQueryFlags()
{
return ParentClass::doQueryFlags();
}
MStatus narrowPolyViewerCmd::clearResults(narrowPolyViewer &view)
{
view.removeAllCameras();
}
MStatus narrowPolyViewerCmd::initTests(narrowPolyViewer &view)
{
clearResults(view);
for (; !dagIterator.isDone(); dagIterator.next()) {
if (!dagIterator.getPath(cameraPath)) {
continue;
}
continue;
}
fCameraList.append(cameraPath);
}
view.setCameraList(fCameraList)) {
} else {
view.refresh();
}
}
MStatus narrowPolyViewerCmd::testResults(narrowPolyViewer &view)
{
cout << "fCameraList.length() = " << fCameraList.length() << endl;
cout << "fCameraList = " << fCameraList << endl;
cout << "view.fTestCameraList.length() = " << view.fTestCameraList.length() << endl;
cout << "view.fTestCameraList = " << view.fTestCameraList << endl;
}