Scripting
Big Picture Goal:
By switching over to having a proper integration with Python, the goal is to increase possibilities of what users can do through scripting. Tapping into the expandability of Python via the vast array of available libraries, we aim to allow users to be able to extend the functions of Grid Studio through scripting much faster and much easier.
Detail Description:
Scripting
Sample Project
In Grid Studio, all of the scripting has been switched to be in fully Python. This enables a more versatile and easier approach to scripting environment.

This means that all of the standard python functions are fully supported.
If there are some additional functions that you like to help with what you want to do, you can extend the functionalities by importing some additional libraries.

For some users, scripting in a proper IDE is a more preferred option. In v2, it is possible to link Visual Studio Code with Grid Studio. To do so, you would need to go under the Preferences section and under the Script Settings tab, you would need to let Grid Studio know where VS Code is installed.

Once this is done, then in any scripting object, you would find the VS Code icon at the top right corner.

You can click on this to open the script inside VS Code. A temp file would be created and linked to the script object in your project. You can then directly edit inside VS Code and save that file, and see the changes are updated inside the corresponding script object in your project.

Some Custom SP Functions
Working with Color values
brighter()
returns a color that is brighter
amount=float
contrast()
returns a color with a certain amount of contrast
int
darker()
returns a color that is darker
amount=float
interpolatedWith()
spColor, float
isBright()
returns a bool if the color is a bright color
isDark()
returns a bool if the color is a dark color
overlaidWith()
sp.Color
withAlpha()
returns a color with a specific alpha value
int
Last updated