Add message/Warning/Error to a OP via HDK

   3273   3   0
User Avatar
Member
58 posts
Joined: Sept. 2009
Offline
I figure addWarning and addError are protect methods of OP_Node. They can only be called during cookMySOP(), am I right?
is there a way I can add warning to other OPs instead itself?
something like:

OP_ROP* myRop = OPgetDirector()->findROPNode(“/out/myMantra/”);
myRop->addError(ROP_MESSAGE, “some message”);
User Avatar
Member
7710 posts
Joined: July 2005
Offline
You can only call those during a cooking code path. Or you can try using appendError() when outside a cooking code path. I'm not sure those will show up though unless you also made a call to opChanged(OP_UI_CHANGED).
User Avatar
Member
58 posts
Joined: Sept. 2009
Offline
Thank you, Edward.
So what I am trying to do is, I have a procedural shader hdk, when the procedural code hits an error, I wanna bring the error message to a ROP or a SOP. Is there a way to do so?
User Avatar
Member
58 posts
Joined: Sept. 2009
Offline
and one more question,

ROP_Node* rop = OPgetDirector()->findROPNode(“/out/my_Mantra/”);
rop->appendError(“OP_CHANGED”, ROP_MESSAGE,“whatMessage”,UT_ERROR_MESSAGE);

the document says that the appendError() needs first argument “const char* type”, I don't quite understand what it needs here. :?:
  • Quick Links