<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jun 20, 2016 at 7:02 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi all,<br><br></div>In my custom interaction style (derived from vtkInteractionStyleUser), I have a need to be notified when the interaction style is set on an interactor.<br><br>The reason I need this is that the purpose of my interaction style is to lock the camera position to a cylinder around my subject: The user should be able to zoom in/out, rotate around the subject on a circle, change the azimuth, and pan up/down along the subject (which has the shape of standing cylinder), but not perform other camera movements. The focal point should always be on the axis through the middle of my subject which is parallel to the Y ("vertical") axis. I therefore would like to do some initialization of the camera when the interactor is first set on the interactor style (and, I guess equivalently, when the interaction style is set on the interactor).<br><br></div>In C++ I think I could override SetInteractor on the interactor style, but in Python that won't work. Is there some event I could listen for which fires when the interaction style gets a new interactor?</div></div></blockquote><div><br></div><div>Only the ModifiedEvent, but it fires a lot and therefore observing it is inefficient.  If you have your own interactor class (and if you use it throughout your application), then you can override its SetInteractorStyle() method since that method is called from the Python side.</div><div><br></div><div> - David</div></div><br></div></div>