Draw To Screen Space Foreground From DrawViewportWires

For posterity, I did a bit more testing and cobbled together what appears to resolve this. Basically, getting rid of the hack to pipe into DrawViewportWires and instead run a conditional statement in DrawForeground that checks if the component preview is on, that we are in the correct Grasshopper document (basically the same as Giulios original solution, doh!), and in the active Rhino view:


230927_ScreenLegendDebug_00.gh (8.0 KB)

Edit: Updated to also check if the component is locked before drawing, cheers @antoinemaes

8 Likes