RhinoView.InDynamicViewChange - Zoom Missing?

Hi everyone!

I don’t see any ability to determine if a RhinoView is currently being “zoomed in/out”

RhinoView.Modified works for resizing a view and RhinoView.InDynamicViewChange works for Pan & Rotate interactions but not Zoom interactions?

https://developer.rhino3d.com/api/rhinocommon/rhino.display.rhinoview/indynamicviewchange

Am I missing something @dale @stevebaer @CallumSykes ?

I have conditional logic that prevents code from firing if the Viewport is being manipulated but while using MouseWheel to zoom in/out unfortunately the logic still fires as this is not picked up by the InDynamicViewChange method.

The logic creates some “fancy preview display stuff” that needs to be dynamic based on the view but I don’t want it to fire while the user is manipulating the view, only once the view has “settled”.

Any ideas? Thanks for your help!

We don’t have any logic built in to know that another mouse wheel event is coming while processing the current mouse wheel event. InDynamicViewChange is not set to true during mouse wheel events

1 Like

Thanks @stevebaer ,

Is this exposed somewhere? I’d be happy with being able to access the “current” mouse wheel event but I cant seem to find that anywhere either.

No; this is part of the windows/mac operating system event processing in RhinoView. We don’t expose this.

Understood, so I need platform specific code to tell me to listen to the mousewheel then such as tapping into .NET System or win32? Is that correct?

Such as:

MOUSEEVENTF_WHEEL
0x0800
The wheel has been moved, if the mouse has a wheel. The amount of movement is specified in dwData

This involves processing the WM_MOUSEWHEEL event. There’s probably a way to hook the RhinoView’s event loop, but I haven’t looked into this for quite a while. I’ve looked into this issue of trying to figure out if another wheel event is coming as I would have set InDynamicViewChange to true, but wasn’t able to make it work. It might be better to understand what “fancy preview display stuff” is and see if there are ways to optimize that.

1 Like