<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-06-26 16:13 GMT+02:00 David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Sun, Jun 26, 2016 at 2:08 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>David Gobbi, I think you worked on calldata support for Python (?), do you know if it's currently impossible to handle these events correctly from Python? (since they expect an answer through a memory write).<br><br></div><div>I find these events quite strange actually. An event to me is something you fire and forget, not a request for information like these ones seems to be. Anyone know why the API was built like this?</div></div></div></div></blockquote><div><br></div></span><div>I suspect that vtkGenericOpenGLRenderWindow is the only class that expects values to be returned via the calldata pointer.  This behavior is sufficiently strange that the Python wrappers will probably never support it.<br></div><div><br></div><div>Instead of returning the information via the calldata pointer, you can call the following methods that were added to the class for this purpose:</div><div><br></div><div><div>    // Description:</div><div>    // Allow to update state within observer callback without changing</div><div>    // data argument and MTime.</div><div>    void SetIsDirect(int newValue);</div><div>    void SetSupportsOpenGL(int newValue);</div><div>    void SetIsCurrent(bool newValue);</div></div><div><br></div><div>These methods were added in order to make it possible to use this class with Java, but they should work equally well with Python.</div></div></div></div></blockquote><div><br></div><div>Excellent, thanks! I actually browsed past them while looking at the code, but in a rush didn't realize that's precisely what they were for.<br><br></div><div>Elvis<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="HOEnZb"><font color="#888888"><div><br></div><div> - David</div><div><br></div><div><br></div></font></span></div></div></div>
</blockquote></div><br></div></div>