You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 6, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 6, 2021. It is now read-only.
In the C# and VB.NET scripting components, it is possible to include functions below the main script, in the editor, and to collapse these code blocks.
It would be really nice to have the ability to collapse blocks of code, so that one could include a large amount of additional functions or classes in a script without compromising readability. This offers an alternative to importing packages.
Thanks Giulio, this does help. My only other concern is that fold persistence: if I give someone a ghpython component with folded functions and they open it, will those functions remain folded?
I'll test and let you know.
it will not remain folded. Folding is usually just an editor help (.py files are simple text). And it does not stick in the _EditPythonScript editor, so it won't stick in the GhPython editor either, sorry. What should the next reader understand from the folding strategy?
Activity
piac commentedon May 17, 2012
Newer versions of Rhino 5 have an improved code folding strategy. Just making a function should make the inner scope properly foldable. Does it help?
bengolder commentedon Jun 13, 2012
Thanks Giulio, this does help. My only other concern is that fold persistence: if I give someone a ghpython component with folded functions and they open it, will those functions remain folded?
I'll test and let you know.
piac commentedon Jun 13, 2012
Hello Ben
it will not remain folded. Folding is usually just an editor help (.py files are simple text). And it does not stick in the _EditPythonScript editor, so it won't stick in the GhPython editor either, sorry. What should the next reader understand from the folding strategy?