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
(奇怪的行爲)。
我很感激任何幫助。