As it appears lately I’m using more and more GH_Python components in SDK mode. Therefore, every time I have to rearrange the code and add the common method overriding.
Is one of the following possible?:
Automatic re-arrangement of the code when toggling SDK mode?
Separate button to run ghpython directly in SDK mode?
Use right-click, or hold left-click or whatever (like rhino has left and right click could start different commands) to directly run in SDK mode?
Have a template of the code for SDK mode just like “Set Template Code…” but a separate one for SDK mode?
All of these can be achieved by creating a Grasshopper User Object with the component preset the way you want it.
The component is already doing what it reasonably can. More would be maybe technically possible, but really going beyond the purpose of a simple editor.
Thanks,
Giulio
–
Giulio Piacentino
for Robert McNeel & Associates giulio@mcneel.com
So I can simply change to SDK mode and rearrange the code then create UserObject. Never thought of using User Objects for just one component. Thanks for the hint.
Yeah, I get that, but if you think about it SDK mode could be reasonable to be a separate (advanced) component. May be added to the wish list. If you want to allow your employees to code but not allow them advance coding and compiling then if they are separate components you can just forbid using the advanced (SDK mode on) editor.
Well if the simplified version of ghpython (with removed SDK mode and Compile buttons) and the advanced one (having SDK mode and compile and rearranged code) are added to GH as separate GHAs you could just restrict the user to not have the advanced one.
Anyways, as you said, not high in the wishlist, which is understandable.