I am developing plugin that already functional as desired for now. I want to add HUD feature for that. I was looking samples and documentation about that but a bit confused when I try to impement HUD.
I created MyPluginDisplayMode object inherited from RealtimeDisplayMode object to use HUDs. (I didn’t add any implementation for overriden methods come from RealtimeDisplayMode)
I registered this object as MyPluginDisplayMode.RegisterDisplayModes(PlugIn);
I initialized it in MyPluginViewModel object which is inherited from Rhino.UI.ViewModel
Lastly I used this method variableName.HudShow();
When I open my plugin in rhino nothing initializing, what I am missing something in structure?
The HUD feature for realtime display mode integrations is probably not what you’re looking for, unless you plan to actually integrate a realtime rendering engine.
I tried sample, it’s kind of that I am trying to do but I want them in different Display Mode.
I want to create plugin specific display mode that when user switch to it, will be able to see some dynamic values, some of them text some of them graphs as you can see below image.
You should be able to know what display mode is currently picked so i guess checking it and turning on/off hud will work - @nathanletwory should know if there is event to hook up like OnDisplayModeChanged or sth similar.
Check if the View.DisplayMode of the DrawEventArgs you get in your implementation corresponds to your display mode. If not just return early from the draw function.
As response my question briefly, is it enough to use DisplayConduit for HUD texts and graphs? Or will I need RealtimeDisplayMode? I still confused sorry.
You don’t need the RealtimeDisplayMode, unless you integrate a render engine like Cycles (from Blender) is integrated in Rhino as Raytraced. If you just have a regular display mode, and want to show extra information you use just the DisplayConduit.