For the first, you should be able to use Op::message_f() to warn the user or ask them a question.
I’m a little unclear about your second question though... -Nathan From: Jonathan Graham Sent: Monday, November 19, 2012 3:47 PM To: [email protected] Subject: [Nuke-dev] Write to File Popup Hi all, I've created a Nuke plugin which reads a Color Transformation Language (CTL) file, transforms the data from the incoming node, and passes it to the outgoing node. When the file is read in, it is displayed in a multiline string knob so that the file can be edited and saved. My issue is with the write knob to save the file. I would like some way to warn the user with a popup if the file already exists. Is this possible to do with the NDK? Here is my knob code: void NukeCtlIop::knobs(Knob_Callback f) { File_knob(f, &callbackFilename, "Read CTL File"); DD::Image::Knob* textKnob = Multiline_String_knob(f, &ctlText, "CTL Text"); DD::Image::Knob* writeKnob = Write_File_knob(f, &callbackWriteText, "Write CTL File"); if (strcmp(filename, callbackFilename)) { filename = callbackFilename; loadFileToKnob(); textKnob->set_text(ctlText); } } My other issue is how to call a function based on the callback. I currently have a hack that if the filename changes from the previous one, the file is loaded. I would like to do something more along if the line of if (f == read) loadFile(inFilename) else if (f == write) writeFile(outFilename) Thanks for your help, Jon -------------------------------------------------------------------------------- _______________________________________________ Nuke-dev mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
_______________________________________________ Nuke-dev mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
