I'm writing a plugin Iop that describes a no-inputs op which essentially
just receives image data from a server (that is in turn accepting data from
a renderer). I'm trying to understand the logic of when Nuke creates
multiple instances of my Iop.

In normal use I see nuke call MyIop::MyIop(Node*), then MyIop::attach(),
then MyIop::_validate(), as expected. However in certain circumstances when
I am pushing image data to my node across a socket, Nuke starts creating
many instances of MyIop, then calling _validate() without calling attach()
(which makes sense since I have not created any new nodes). This is causing
me issues because every time _validate() is called MyIop tries to make a
new connection to the server, which is bad. I understand from the docs that
I shouldn't expect to only ever have one instance of MyIop for each node in
the graph, but none of the circumstances listed for when this might happen
seems to apply in this case.

This seems to happen when I am pushing a lot of data to several nodes -
every time there is a new bucket of image data passed from the server, I am
calling flagForUpdate() and asapUpdate() from a listener thread. If I am
rendering to say, 4 nodes, this can happen quite a lot.

Is this expected behaviour? Or is it due to something I am doing? Should I
be checking whether a MyIop instance is actually attach()ed to a node
before doing any processing with it?

I've been through all the docs that seem pertinent, but still I don't
really understand why Nuke might be creating these extra instances of my
iop.

Cheers,

Anders
_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

Reply via email to