script_command third argument should be "true" if you want to get result from it. If you use this the script must be an expression.
2013/3/6 sh4dow <[email protected]> > > This piece of code here: > > Code: > > strPython = "print 'asdf'"; > script_command(strPython.c_str(), true, false); > //script_unlock(); > cout << "script_result: " << script_result() << endl; > > > Prints "Viewer1" in the console. In Script Editor, "script_command" does > what it should do. > Based on the fact that this is my first plugin, I have no idea in what > cases one is supposed to call "script_unlock()" but it doesn't matter. > Calling it or not doesn't change anything. Neither does setting the python > flag to true for "script_result()". > > Does anybody have a solution for this? (I hope to be able to avoid adding > a hidden knob to my plugin and retrieving the result of the python script > that way...) > > _______________________________________________ > 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
