Dear Nuke-dev community, I feel that an answer to the following question already exist somewhere but couldn't yet find it and keep running into dead ends.
TLDR: How can an implementation of Executable display its currently processed image in the viewer? The official example [1] demonstrates quite nicely that the viewer does not display the currently processed frame while DD::Image::Executable is processing an image sequence, i.e. it continues to display the last frame that was selected before starting Executable. Interestingly, when adding build_handles( ViewerContext * ctx ) draw_handle( ViewerContext * ctx ) to the above example, the handles are drawn * each time before Executable::executable() and * the first time a row of the input is fetched: row.get( input0(), ... How does that go together? The CameraTracker is able to do this kind of viewer update, but it seems to use some sort of unknown trickery since it doesn't appear to be an instance of DD::Image::Executable: // Assuming input(0) of the Op connects to an instance of the CameraTracker. DD::Image::Executable* ex0 = input(0)->execute(); DD::Image::Executable* ex1 = dynamic_cast<DD::Image::Executable*>( input(0) ); // ex0 and ex1 are both NULL A similar question has been asked in forum [3] but never received an answer. A couple of years back Georgiy Osipov suggested a way to manually process an image sequence which allows to set the context to the current frame and also updates the viewer [2]. While his methods does what I want it blocks the UI of Nuke. I also tried to switch the frame from inside Executable::execute via the NDK and via the Python interface - to no avail. I thought of (but didn't try yet) to fetch the image from the input Op inside draw_handle() and then manually turn it into an OpenGL texture and display it. But I'm not sure that even works. Since I don't think that the original authors of the CameraTracker feel an overwhelming urge to share how they tackled this problem (am I wrong?!?), I wonder if this can be done at all with the current NDK? If yes, did someone else face this problem and found a solution to it? Sincerely, Nils [1]: http://docs.thefoundry.co.uk/nuke/90/ndkreference/examples/NormaliseExecute.cpp [2]: https://www.mail-archive.com/nuke-dev%40support.thefoundry.co.uk/msg00902.html [3]: http://community.thefoundry.co.uk/discussion/topic.aspx?f=191&t=108573 -- Nils Plath Researcher imcube labs GmbH Helmholtzstraße 2-9 D-10587 Berlin phone: + 49 30 367405320 mail: pl...@imcube.de <mailto:pl...@imcube.de> web: www.imcube.de <http://www.imcube.de> Handelsregister | Register of Commerce AG | District Court] Berlin | Charlottenburg HRB 120009 [Geschäftsführer | Managing Directors] Dr. Sebastian Knorr Please consider your environmental responsibility before printing this e-mail. This message is exclusively for the person addressed or their representative. If you are not the intended recipient of this message and its contents, please notify the sender immediately. Any form of unauthorised use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. Electronically transmitted messages can contain errors for which we assume no liability.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Nuke-dev mailing list Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev