Can I control Environment rotation with a script?

That is most likely because the script runs on the main thread.

:expressionless: …I wish I understood what that meant and that I had the knowledge to use that info…
Anyway, it is only a step on the way to make a slider. I have the slider hooked up, but I have no idea on how to make it interactive.

Also I get the slider to return whole number (int’s) it seems.
(As a workaround I’ll rewrite it to use degrees instead of radians for now)

ETO slider - rotate environment.py (3.6 KB)

Edit: Here is the degree version:
ETO slider - rotate environment - degrees.py (4.0 KB)

EDIT 2: I just updated the script so it gives an error message if no environment is sat for reflection.
(I have no idea how to find the GLOBAL environment value, only the custom ones)

If you want to see changes while dragging the slider you’ll have to create a modeless dialog. Here some sample to get started:

1 Like

Shoot… this is getting more and more complex.
I wish it was as easy as making scripts in Unity.
There the UI is added automatically as the scripts are tied to the project.
Maybe something for Rhino V8? :slight_smile:

I have to put this project on hold for a few days, but thanks a lot for the help so far! I have gotten some progress and learned a few things too.