algorithmic modeling for Rhino
Hello,
I have installed rhino 5 eval, grasshopper (0.9.0014), ghpython (0.5.1.0) and
got the "circles" python example to work. But, I cannot figure out how
to edit the input and output parameters. The Python Script object in grasshopper
has inputs "x", "y", and outouts "out" and "a". Is it supposed to extract the input
and output parameters from the python script automatically? This seems pretty
basic and I suspect I am not seeing something obvious. Thanks!
-Robert
Tags:
Hi Robert,
Both input and output parameters can be added and removed from a Python component using the ZUI controls (zoom in and small +/- signs should appear). Right-click any parameter (excluding code and out) to change the name of this parameter. The parameters you've created now "exist" as variables which you can use within the Python component script (by the name you typed).
For input parameters you should be aware that you can set them to either item, list or tree access (depending on what is being wired to it) and that you can set a type hint which will determine how Python interprets which type of object you are a feeding into it (i.e. Point3D, float, string, GUID, mesh etc.). Both of these settings are also accessed by right-clicking the parameter inputs.
The output parameters are determined by whatever you assign to their variables within the script. So their type obviously depend on whatever their assignment it.
Does that help?
Ps. The versions you are running are a little buggy, so you may experience some odd behaviour like wires breaking and such. If this happens I suggest rolling back to GH 0.8.0066 and GhPython 0.5
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by