Serpens 3 package containing new scripting nodes.
This package is free, but you can support me through: paypal.me/mahrkeenerh
Donate | Download |
---|
- Download the zip file,
- In the
N
panel of serpen (in serpen node editor), go to Extensions, and Packages, - Click install Package and select the zip file,
- Restart blender.
This node allows to run a custom python Function from a script, and receive the return results.
If Use Keyword Arguments
is checked, the function uses keyword arguments, otherwise positional arguments.
To allow usage of Script Functions, the Script file containing python functions must first be loaded.
When changes are made, the script must be reloaded.
# addon.py
def combine_strings(string1, string2):
return string1 + string2
string1
andstring2
are the function parameter inputs, naming must match, position doesn't have to matchoutput
is the return value of function, can be named anything
first
andsecond
are the function paremeter inputs, but naming doesn't have to match, position matters
# addon.py
def swap_input(string1, string2):
return string2, string1
Multiple outputs can either be combined, or split into separate outputs.
This node allows you to define a python expression, or execute the python expression (to preserve current state).
In order to use other libraries that require to be imported, the import
first must be executed. Then the library can be used anywhere in the addon.
Expression
nodes can be combined to improve readability.
Adds support for Python's try except
statement.
Print Errors
will print the error to the console, if an error occurs.
Very straight-forward node, allows combining multiple input and output Execute
sockets together.
Each of the connected inputs will execute all of the outputs.
Adds support for Python's while loop
.
Be careful, as this very well may crash your file, if you're not sure what you're doing.