Is it possible to set the default values of a scripting component from inside the code in such a way that when hovering over the input the hint displays that default value?
Second question is related to the first one. Can I set the type?
NOTE: Assume that component will be compiled to .ghpy.
For now, just save the files in a folder. When you have tons of files to update, it will be clear what type of meta-script will be needed.
If you need to edit the def RegisterInputParams(self, pManager): function (provide defaults, change some behavior, etc), you will need to edit your compiled code anyways before going to compile it. So it’s just better to use the folder with the .py files as source, edit it to your needs, and compile that. Do not use the evaluated component as base all the time. That is OK if you do not compile your code.
Secondary question:
How can I change the output path?
There’s no method inside assemblySettings where I can set a path, instead of using assemblySettings.GenerateDefaultPath()
after the local assembly is saved to disk, you can move the file to any location.
Again, those methods you are trying to use are simply used for the automatic one-click compilation, they are not meant for advanced customization.
That’s kind of it, I don’t want to have to move the file, I want it to be in my project folder ready to be zipped and shipped.
Can I make it a wish then? Why provide such a beautiful thing like compiling-sdk.gh then restrict it, not provide enough methods to make it more advanced?
All that modifying the code editing the py files, copy compilation code all this could be automated with just a few scripting components in GH. This way you can have a GH definition for each project containing the latest version of your components (assembly, plug-in, whatever).
The update/upgrade of your project will be a single click. Isn’t that we’re all after, “…making the world a better place…”?