Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5926

Calling different functions from a single python file

$
0
0

@Tim_Williams wrote:

Looking for a better way to do this:

I'm trying to create a Toolbar Menu Dropdown with preset layers. I have about 100 of these buttons, each loading just one layer of choice.

Currently, I'm using Rhino Buttons within the toolbar to run python scipts with -_RunPythonScript somefile.py 0 where the integer is then passed into the script with rs.GetInteger and then executes whichever function is associated with that integer.

Though this is working, I'm interested to see if theres a more efficient way of doing this. Preferably, one that does not add Text: 0 to the command line each time.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5926

Trending Articles