MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / vmessage

Method vmessage

Engine/OfxImageEffectInstance.cpp:250–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250OfxStatus
251OfxImageEffectInstance::vmessage(const char* msgtype,
252 const char* /*id*/,
253 const char* format,
254 va_list args)
255{
256 assert(msgtype);
257 assert(format);
258 std::string message = string_format(format, args);
259 std::string type(msgtype);
260 OfxEffectInstancePtr effect = _ofxEffectInstance.lock();
261 if (!effect) {
262 return kOfxStatFailed;
263 }
264 if (type == kOfxMessageLog) {
265 LogEntry::LogEntryColor c;
266 if (effect->getNode()->getColor(&c.r, &c.g, &c.b)) {
267 c.colorSet = true;
268 }
269 appPTR->writeToErrorLog_mt_safe(QString::fromUtf8( effect->getNode()->getLabel().c_str() ), QDateTime::currentDateTime(),
270 QString::fromUtf8( message.c_str() ), false, c);
271 } else if ( (type == kOfxMessageFatal) || (type == kOfxMessageError) ) {
272 effect->message(eMessageTypeError, message);
273 } else if (type == kOfxMessageWarning) {
274 effect->message(eMessageTypeWarning, message);
275 } else if (type == kOfxMessageMessage) {
276 effect->message(eMessageTypeInfo, message);
277 } else if (type == kOfxMessageQuestion) {
278 if ( effect->message(eMessageTypeQuestion, message) ) {
279 return kOfxStatReplyYes;
280 } else {
281 return kOfxStatReplyNo;
282 }
283 }
284
285 return kOfxStatReplyDefault;
286}
287
288const std::vector<std::string>&
289OfxImageEffectInstance::getUserCreatedPlanes() const

Callers

nothing calls this directly

Calls 6

messageMethod · 0.80
lockMethod · 0.45
getColorMethod · 0.45
getNodeMethod · 0.45
getLabelMethod · 0.45

Tested by

no test coverage detected