title: How to exchange custom data between Ops in Nuke?
body: <p>This questions is addressed to developers using C++ and the <a href="http://docs.thefoundry.co.uk/nuke/90/ndkreference/Plugins/index.html" rel="nofollow" title="Nuke NDK reference">NDK</a> of <a href="http://www.thefoundry.co.uk/products/nuke/" rel="nofollow" title="The Foundry Nuke">Nuke</a>.</p>
  
  <p><strong>Context:</strong> Assume a custom Op which implements the interfaces of <code>DD::Image::NoIop</code> and 
  <code>DD::Image::Executable</code>. The node iterates of a range of frames extracting information at 
  each frame, which is stored in a custom data structure. An custom knob, which is a member
  variable of the above Op (but invisible in the UI), handles the loading and saving 
  (serialization) of the data structure.</p>
  
  <p>Now I want to exchange that data structure between Ops.</p>
  
  <p>So far I have come up with the following ideas:</p>
  
  <ol>
  <li><p>Expression linking</p>
  
  <p>Knobs can share information (matrices, etc.) using expression linking. 
  Can this feature be exploited for custom data as well? </p></li>
  <li><p>Serialization to image data </p>
  
  <p>The custom data would be serialized and written into a (new) channel. A 
  node further down the processing tree could grab that and de-serialize 
  again. Of course, the channel must not be altered between serialization 
  and de-serialization or else ... this is a hack, I know, but, hey, any port 
  in a storm! </p></li>
  <li><p>GeoOp + renderer</p>
  
  <p>In cases where the custom data is purely point-based (which, unfortunately, 
  it isn't in my case), I could turn the above node into a 3D node and pass 
  point data to other 3D nodes. At some point a render node would be required 
  to come back to 2D.</p></li>
  </ol>
  
  <p>I am going into the correct direction with this? If not, what is a sensible 
  approach to make this data structure available to other nodes, which rely on the 
  information contained in it? </p>