Two questions:
- Given MainWindowForDocument doesn’t exist in Rhino6, what is the most cross-platform-friendly way to parent my ETO forms? This is what I’m doing at the bottom of all my ETO forms’ code currently. And it seems to work on Windows for Rhino 6, 7, and 8, but I don’t have a Mac to test it on.
if __name__ == '__main__':
dialog = MyDialog()
if rs.ExeVersion() > 6:
parent = Rhino.UI.RhinoEtoApp.MainWindowForDocument(sc.doc)
else:
parent = Rhino.UI.RhinoEtoApp.MainWindow
Rhino.UI.EtoExtensions.ShowSemiModal(dialog, sc.doc, parent)
I just want to know if there is a better way to do this…especially for Rhino6.
- The new ETO documentation uses both
sc.doc
and__rhino_doc__
as an argument for MainWindowForDocument in the various examples and I wondered if there was any difference between the two or is that two ways to reference the same object?
(Also, I noticed none of the new ETO documentation uses the if __name__=="__main__":
Is it better to not use that or does it make no difference?)
Any thoughts, @CallumSykes?