Jonathan, I know nuke is your baby but your the man... Definitely!!! I'll try that later...
Nicolas Envoyé de mon iPhone Le 10 mars 2011 à 17:53, Jonathan Egstad <jegs...@earthlink.net> a écrit : > I've had no crashing problems with separate threads at the C++ plugin level. > If you use the built-in DDImage threading support it should work: > > > static void server_callback(unsigned index, unsigned threads, void* p) { > static_cast<MyIop*>(p)->check_server(); > } > > void MyIop::check_server() { > // talk to renderer, get pixels, call update(), delay; > } > > void MyIop::_validate(for_real) { > ... > ... > if (m_interactive && DD::Image::Application::gui && m_server_status < > SERVER_LISTENING) { > m_lock.lock(); > if (m_server_status < SERVER_LISTENING) { > Thread::spawn(server_callback, 1, this); > m_thread = Thread::thisThread(); > } > m_lock.unlock(); > } > } > > -jonathan > > On Mar 9, 2011, at 9:37 AM, anders langlands wrote: > >> I never found a way to update the buffer properly from a separate thread >> without nuke crashing. In the end we just added a button to call >> asapUpdate() from the main thread. It's stable, and it gives TDs something >> to do while they're waiting for renders. >> >> On Wed, Mar 9, 2011 at 5:30 PM, Nicolas DUMAY <3djo...@gmail.com> wrote: >> Hi all, >> >> I'm working on a Iop that take his infos ( the pixels ) from an >> external renderer. >> My Iop have an internal buffer that I fill with rendered buckets and >> the engine function simply display that buffer. >> I'd like to call ASAPUpdate when a bucket ended but that lead to too >> much call in a few moment and nuke badly segfault. Any idea or >> workaround? >> >> Nicolas >> >> Ps: I already try to put a usleep of 0.1 sec before calling ASAPUpdate >> but this slow my render on simple scene and I'm not sure it's the best >> way of doing it... >> >> Envoyé de mon iPhone >> _______________________________________________ >> Nuke-dev mailing list >> Nuke-dev@support.thefoundry.co.uk >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev >> >> _______________________________________________ >> Nuke-dev mailing list >> Nuke-dev@support.thefoundry.co.uk >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev > > _______________________________________________ > Nuke-dev mailing list > Nuke-dev@support.thefoundry.co.uk > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev _______________________________________________ Nuke-dev mailing list Nuke-dev@support.thefoundry.co.uk http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev