Hello,
I'm working on a big project which uses 3rd party library and I get some strange results if I try to interrupt my nodes. At first i thought that I'm doing something wrong and UT_AutoInterrupt send to callback of this library is not working properly, so I took example node that comes with Houdini SOP_Flatten, removed almost all code from cookMySop() and tried to interrupt it. This is what I get:
There should be only Warning set. But I do get additional Error. And I don't know from where it come from. This is the code I have in cookMySOp():
OP_ERROR
SOP_Flatten::cookMySop(OP_Context &context)
{
OP_AutoLockInputs inputs(this);
if (inputs.lock(context) >= UT_ERROR_ABORT)
return error();
auto progress = UT_AutoInterrupt("");
for (auto i = 0; i < 10000; i++)
{
if (progress.wasInterrupted())
{
this->addWarning(SOP_MESSAGE, "Test interrupted.");
return error();
}
std::cout << "YAY: " << i << "\n";
}
return error();
}
Anybody knows why I do get this additional Error state when interrupting the node?
I'm on H18.0.348.