Dear McNeel team,
It looks like in a recent update of Grasshopper for RH8 has introduced a test too strict in GH_Document.ShouldDrawPreview(e) (or so I guessed) that prevents Grasshopper to refresh viewports hosted in WPF by RhinoInside applications. This is a big issue for us as it means we cannot have Grasshopper to redraw anything in our RhinoInside-based software anymore.
The problem is a recurring one, I already mentioned it in this post more than a year ago, which unfortunately was left unanswered:
- Rhino viewports that have no parent Rhino View are discarded from some redrawing and picking (getpoint) interactions.
- There is no way to add a parent View in the ViewTable for a hosted WPF viewport, thus creating all sorts of refresh and event passing problems that so far I managed to fix by recoding all viewport interactions including picking, gumballs,… but this time there is nothing I can do.
Could you please amend these changes and/or propose a solution to this issue, as it is not one I can bypass?
If I believe the debugger, this should be the culprit, but I cannot be sure:
private bool ShouldDrawPreview(DrawEventArgs e) => object.Equals((object) e.RhinoDoc, (object) this.RhinoDocument) && (e.Viewport != null && ((e.Viewport.ViewportType == ViewportType.StandardModelingViewport || e.Viewport.ViewportType == ViewportType.DetailViewport) && (**e.Viewport.ParentView != null** && this.ShouldDrawPreview())));
Best regards,
Thibault