Blinking Light

Hi there!

I would like to use the Python API to reproduce the blinking of a light. I don’t want to use the vcLight class because I want the light to be coloured.
I tried 2 things:
- having a feature in the shape of the lightbulb and then changing its color every few seconds; this doesn’t work well, because after changing the material I have to run feature.rebuild(), which causes the simulation to lag;
- having a feature in the shape of the lightbulb and then switching its visibility every few seconds; this is problematic for the same reason as above

Thank you

The trick is to use Sx, Sy, Sz, this will avoid rebuild the feature.
In eCat, seach “Quality check camera”, check Link3 node.

1 Like

thanks for your reply, man!

Can you tell me what are Sx, Sy and Sz? And what is eCat? :slight_smile:

Sx.Sy.Sz means scale.
When Sx to 0, feature in X direction will be hidden.
When Sy to 1, feature in Y direction will be shown.
When Sz to 2, feature in Z direction will be twice bigger than original.

image

1 Like

Thank you! This was very helpful, it solved my problem!

1 Like