0
我可以在MPxNode::compute
方法中使用MProgressWindow
方法吗?即使未被其他进程使用,我的插件实施也不会保留MProgressWindow
。MPxNode内使用MProgressWindow :: compute
MStatus Node::compute(const MPlug & plug, MDataBlock & data) {
if (!MProgressWindow::reserve())
return MS::kFailure;
MProgressWindow::setTitle(this->typeName);
MProgressWindow::setInterruptable(true);
MProgressWindow::setProgressRange(0, 100);
MProgressWindow::setProgressStatus("Initializing: 0%");
MProgressWindow::setProgress(0);
MProgressWindow::startProgress();
// Some expensive operation.
// If the user presses ESC key, this ends the progress window and returns failure.
MProgressWindow::endProgress();
return MS::kSuccess;
}
注意:当节点被删除时,显示MProgressWindow
(奇怪的行为)。
我很感激任何帮助。